← All entries
Paper2026#1423

Copy-Paste Language Models

Summary

Adds a pointer-style Copy-Paste (CP) head beside the standard LM head, motivated by the authors' own prior result (Godey & Artzi 2026) that the LM head is an optimization bottleneck, not just an expressivity one: backpropagating V-dimensional logit gradients through the D-dimensional head compresses them like a random projection — at 135M scale (D=576, V=49,152) LM heads lose over 99% of the gradient norm before it reaches the backbone, with the loss level set by the D/V ratio. Mechanism: the CP head scores context positions with q_t = W_Q h_t and keys k_τ = W_K h_τ (two D×D projections plus one sink key, +0.5% params at 1.7B); the copy distribution marginalizes attention over positions carrying the same token. A dummy <copy> token in the LM head supplies the gate c_t (its softmax probability); a learnable <sink> key in the CP softmax supplies the fallback probability s_t; the prediction is the mixture p = (1−λ_t)·p_LM + λ_t·p_CP with λ_t = c_t·(1−s_t). Trained end-to-end with plain next-token cross-entropy — no auxiliary loss, no copy supervision; closest prior art is the pointer-sentinel mixture (Merity et al. 2017), but here the gate is decided by the LM head before any copy attention is computed, so decoding can skip the copy pass when it cannot change the argmax. Because CP logits live over t context positions (t << V), the CP gradient path preserves up to 85% of gradient norm at early positions. Setup: ~60% of FineWeb-Edu tokens already appear earlier in a 4k context; pretraining 135M–1.7B on up to 200B FineWeb-Edu tokens (SmolLM2 recipe) across Full-attention, sliding-window, Hybrid 3:1 (SW:full interleave), and Gated DeltaNet backbones. Results: CPLMs reach the vanilla final loss 1.25× faster (Full/Hybrid) to 2× faster (SW) at 1.7B; 0.5–1.5 PPL better on OOD FinePDFs at 1.7B; zero-shot +0.4–0.9 avg (LAMBADA +2.5–4.0); gains also land on tokens the model does not copy. A sliding-window (w=256) CPLM matches full-attention vanilla perplexity at 12× less memory per token (copy cache included), and w≈128 also matches; rolling perplexity keeps improving out to 16k (4× training length) while vanilla models degrade past ~1k. Mechanistic evidence: a stop-gradient ablation (blocking CP gradients into the backbone) keeps only ~25% of the gain (0.008 vs 0.031 nats/token), i.e. ~75% of the benefit is the gradient pathway, not the extra output path; on the SpamLang synthetic task (D=576 fixed, V swept 8k→512k) vanilla collapses (34% accuracy at 512k) while CPLMs solve every size; byte-level models (V=257 < D=576, no bottleneck) get zero gain — a clean falsification check for the rank theory. Capacity effect: 1.7B CPLM backbones form only 4 induction heads vs 13–15 in vanilla models while copying better — the CP head takes over the induction heads' job. Long context (needle test, 1k–64k, averaged over the depth/length grid): SW 14.3% → 99.4%, Hybrid 3:1 58.2% → 83.6%, Full 49.7% → 54.8%; BABILong/RULER +7.5 avg, LongBench +4.1 avg. SFT on Tulu-3 (1.7B): CPLM beats vanilla by +1.2–5.1 average points; SW-256 CPLM lifts MATH (levels 1–2, pass@4) 7.2% → 16.4%, above Full-attention vanilla (13.9%) and near Full CPLM (17.5%); GSM8K gains hold at every pass@k. RAG (HotpotQA distractor setting, fine-tuned 1.7B): with documents hidden from the backbone and reachable only through precomputed CP keys, CPLMs keep 90–97% of their docs-visible accuracy at 5 distractors and 34–38% EM at 500 distractors with a 50× smaller cache than a full KV cache; the SW CPLM holds 34% EM at 500 distractors where every Full model fails, and a last-layer-KV control with twice the CP cache's memory sits at 14% EM (never-sees-the-docs level); document CP keys can be computed once and reused across queries. Overhead (single B300, bf16): +0.5% params at 1.7B/9B (+0.2% at 30B); training at 97% of vanilla throughput at 1.7B (~3% slower), within 1% at 9B/30B; inference prefill unchanged, decode step +1.0–3.8%, per-request +0.8–1.7%; copy cache is D values/token (2.1% of the KV cache at 1.7B). A CPLM variant also holds the modded-nanogpt speedrun record (+11.3% over the prior record, largest architecture-centric speedup since Dec 2024). Ablations: gains are 15–40× seed std at 135M (p<10⁻³); the sink matters most at small windows (−0.3 PPL at w=32, −0.07 at w=256, ~0 at w≥512); the <copy>/<sink> gate beats Chang et al. (2023) pointer partitions and matches or beats sigmoid-gate and shared-softmax mixtures; the CP head also improves Gated DeltaNet and Hybrid-GDN backbones (~0.5 PPL in-domain, 1–6 PPL OOD). Limitations (authors'): the CP head only relaxes the bottleneck for tokens present in the context; experiments stop at 1.7B, so how benefits evolve as D approaches V is untested; shrinking CP projections to d=64 costs nothing (within 0.02 PPL of d=2,048 at 9× less cache), which the pure rank theory does not obviously predict — left open; multi-seed analysis only at 135M; ethics note that easier copying may reproduce sensitive or copyrighted in-context content more faithfully.

Venue
arXiv cs.CL, v1 submitted 13 Oct 2026 (no conference venue stated)
Source
arxiv
Access
free
Language
en
Added
Oct 20, 2026
Verified
Oct 20, 2026
Found via
#che_shr_cat

Research notes

  • Discovery: Hudson shared @che_shr_cat's 11-post thread 2026-10-20 9:32 AM ET (https://x.com/che_shr_cat/status/2112537371170283658) with the full review at arxiviq.substack.com — same discovery pattern as queue #35 (NCM). Thread claims verified against the paper; one correction: the thread's "nearly matching full-attention vanilla (17.5%)" mislabels Table 2 — 17.5% is the Full-attention CPLM; Full vanilla scores 13.9%, so the SW CPLM actually beats it. Relevance: (1) Hudson's pretraining stack is a 3:1 SWA:full-attention hybrid — the paper's Hybrid backbone is literally a 3:1 SW:full interleave, and the CP head moves its numbers substantially (needle 58.2→83.6; 135M PPL 16.37→15.84; SFT avg 24.3→25.5); the pure-SW result (w=256 matches full-attention PPL at 12× less KV, needle 14.3→99.4%) targets exactly the known weakness of SWA layers — associative recall/copying beyond the window. (2) The LM-head gradient bottleneck (D << V random-projection) is a backbone-independent pretraining insight: a second gradient path for ~0.5% params and ~3% throughput. (3) The GDN/Hybrid-GDN gains show the head also helps recurrent backbones, separate from any speed question. (4) Precomputed per-document CP keys as external memory (50× cache cut, reusable across queries) is a retrieval-serving data point. Cluster: Godey/Artzi Cornell line in the catalog — ID 1563 (Shared Memory in Looped Transformers), ID 1257 (Matryoshka Language Model Suites), ID 505 (State-Prediction Separation Hypothesis); the bottleneck theory itself is the authors' Godey & Artzi 2026 prior work; pointer-network lineage from Vinyals et al. 2015 via Merity et al. 2017. Compute: 61 runs at 135M ≈ 50 GH200-hours each; 1.7B runs ≈ 900 B200-hours each; all checkpoints released on HF.
  • License: paper CC BY-SA 4.0 (verified from abs-page license icon; ShareAlike); code: no standalone repo linked in the paper — but verified 2026-10-20 the full training implementation is public as open modded-nanogpt PR #379 (head branch NathanGodey/modded-nanogpt@cplm-record-1050, fork MIT; PR body ships the CP pointer as a fused flash-style Triton kernel (perf/kernels/cplm_copy.py), the LM/copy mixture fused into record-92's fp8 cross-entropy kernel (perf/kernels/cplm_cross_entropy.py), full logs and repro instructions: 36.009s, −11.25% vs record 92 same-node, record-holding); checkpoints released at https://huggingface.co/collections/nthngdy/cplm per paper §3.1 — flag code at insert

Similar entries