TL;DR
Copy-Paste Language Models (CPLMs) introduce a lightweight, dedicated "pointer" head that allows LLMs to explicitly copy tokens from their previous context. By bypassing the traditional "softmax bottleneck" of standard language model heads, CPLMs achieve up to 2x faster training convergence and significantly better long-context retrieval while adding less than 1% in parameter overhead.
What Problem Does This Paper Address?
Language is inherently repetitive—roughly 60% of tokens in common pretraining datasets have already appeared earlier in the same 4k-token window. While we assume Transformers are naturally good at copying, the standard architecture makes it surprisingly difficult.
The culprit is the LM head bottleneck. Standard models produce predictions by projecting a hidden state (dimension $D$) into a massive vocabulary space (dimension $V$). Because $V$ is usually much larger than $D$, this "low-rank" projection limits the model's expressivity and, more importantly, destroys useful training signals during backpropagation. Even if the model's backbone "knows" it should copy a word, the gradient signal often gets lost in the noise of the narrow LM head.
Methods
The authors propose adding a Copy-Paste (CP) head alongside the standard LM head.
- The CP Head: This is a lightweight pointer mechanism. It calculates attention scores between the current state and all past positions in the context. Instead of predicting a word from the whole vocabulary, it simply "points" to a past position and copies the token found there.
- Gating & Sinks: To decide when to copy, the standard LM head is given a special
<copy>token. If the model assigns high probability to<copy>, the CP head takes over. A<sink>token within the CP head allows the model to gracefully fall back to the standard LM head if the context doesn't contain the right answer. - Efficiency: The CP head only adds two small projection matrices ($W_Q$ and $W_K$). At the 1.7B parameter scale, this represents only a 0.5% increase in parameters and a negligible ~3% compute overhead.
Datasets
The models (ranging from 135M to 1.7B parameters) were pretrained on FineWeb-Edu. For evaluation, the authors used a wide array of benchmarks:
- Standard Zero-shot: HellaSwag, LAMBADA, PIQA, SciQ, ARC, and WinoGrande.
- Long-Context & Retrieval: FinePDFs, arXiv, HotpotQA (in a "distractor" setting), BABILong, RULER, and LongBench.
- Supervised Fine-Tuning (SFT): Tulu-3 and Nemotron-3-SFT-Math-v4.
Key Insights and Ideas
- The Gradient "Express Lane": The most profound insight is why this works. Because the CP head points to $t$ positions (where $t$ is the sequence length, e.g., 4096) rather than $V$ tokens (e.g., 50,000+), the gradient pathway is much "wider." This allows richer training signals to reach the backbone, helping the model learn context features more effectively.
- Backbone Specialization: Standard Transformers dedicate many internal attention heads to "induction" (copying). In CPLMs, the CP head handles the copying "heavy lifting," allowing the backbone to learn fewer induction heads and potentially focus on more complex reasoning.
- Extreme Memory Efficiency: CPLMs allow sliding-window models (which only "see" a small local window) to retrieve information from far outside that window using the CP head's dedicated key cache.
Key Results
- Faster Convergence: CPLMs reach the final loss of vanilla models up to 2x faster in sliding-window configurations.
- Better Perplexity: On out-of-distribution documents (FinePDFs), CPLMs improved perplexity by 0.5–1.5 points.
- Reasoning Gains: After supervised fine-tuning, CPLMs showed a 1–5 point accuracy boost on math, code, and instruction-following tasks.
- Retrieval Performance: A sliding-window CPLM matched the performance of a full-attention vanilla model while using 12x less memory per token.
- The "Needle" Test: In "needle-in-a-haystack" tests, the CP head allowed sliding-window models to find information 16x further back than their training length, a feat vanilla models failed completely.
Limitations and Future Work
- Scaling: The study focuses on models up to 1.7B parameters. While the authors show the overhead decreases as models scale, testing on 7B+ or 70B+ models remains for future work.
- Granularity: The current CP head copies single tokens. Extending this to copy multi-token spans or phrases could further improve efficiency.
- External Knowledge: The authors suggest the CP head could be adapted to point to external corpora, potentially offering a more integrated approach to Retrieval-Augmented Generation (RAG).
Summary updated