Full text not available for this paper
Summary (Overview)
- Key contribution: Identifies a flaw in standard Multi-Token Prediction (MTP) training, where a residual component of the MTP gradient interferes with both next-token and multi-token learning, increasingly so with model scale.
- The KL gradient–recovery trick: A novel technique that recovers the exact KL self-distillation gradient from cross-entropy gradients when two distributions share a linear output head, using straight-through gradient routing—without materializing vocabulary-sized logit matrices.
- Soft-MTP: A one-line code change to standard MTP that removes the noisy residual and backpropagates only the useful KL self-distillation signal, requiring no additional parameters and incurring no measurable overhead.
- Empirical results: From 167M to 1.2B parameters, Soft-MTP improves over standard MTP with lower NTP perplexity, faster speculative decoding, higher zero-shot accuracy at every scale, and stronger math and code reasoning after fine-tuning.
- Efficiency: Soft-MTP matches or exceeds explicit KL minimization on most metrics while remaining compatible with fused cross-entropy kernels and standard parallelism schemes used in frontier pre-training.
Introduction and Theoretical Foundation
Background and Motivation
Next-token prediction (NTP) has become the standard recipe for training large language models (LLMs). However, Multi-Token Prediction (MTP)—training models to predict multiple future tokens—has been widely adopted in modern LLM training, including in DeepSeek-V3/4, Nemotron 3, GLM-5, and Kimi K3. MTP offers two advantages:
- Better model performance: Alleviates the myopic nature of next-token supervision, leading to stronger performance on long-horizon domains like mathematics and code.
- Faster inference: MTP heads can be used for speculative decoding.
Despite its widespread adoption, little was understood about how MTP interacts with NTP and which objective is best for training MTP heads. For speculative decoding, a token drafted by MTP is accepted only if it agrees with the model's own next-token prediction—suggesting that MTP heads should be trained to match the NTP distribution via self-distillation. However, naive KL minimization requires materializing vocabulary-sized logit tensors, which is memory-intensive and incompatible with standard fused cross-entropy kernels.
Theoretical Foundation
Consider a model trunk with parameters mapping prefixes to hidden states . A shared linear output head projects hidden states to logits. The next-token distribution is:
The -th MTP head produces hidden states to predict token :
The full MTP objective is:
Methodology
Gradient Decomposition
The paper decomposes the hard MTP gradient (gradient of standard MTP cross-entropy loss with respect to the -th MTP hidden state):
This decomposes exactly into:
where is the position-aligned NTP distribution (Figure 2 illustrates this alignment).
corresponds to the gradient of the forward KL divergence from a stop-gradient teacher:
is the NTP cross-entropy gradient against the data—a residual that has low signal-to-noise ratio.
KL Gradient–Recovery Trick
The core innovation augments NTP hidden states with straight-through gradient routing:
Since is numerically identical to , the augmented NTP loss produces the same NTP gradients. However, it injects an extra gradient with respect to the MTP representation:
Summing the contributions yields the pure self-distillation gradient:
Soft-MTP Implementation
The paper provides a minimal code change (see Figure 1):
z = shared_trunk(x)
h0 = ntp_head(z)
for k in range(1, K+1):
hk = mtp_head[k-1](z, x)
loss_mtp += ce(lm_head, hk, y[k])
# straight-through gradient routing
h0[:, k:] += hk.detach() - hk # h0 is numerically unchanged
loss_ntp = ce(lm_head, h0, y[0])
(loss_ntp + loss_mtp).backward()
Bias–Variance View
The residual splits further into NTP error and one-hot sampling noise:
The NTP error shrinks with scale, but the one-hot sampling noise is irreducible—making Soft-MTP's tradeoff increasingly favorable at scale. The gradient routing across methods is summarized in Table 1.
| Method | Output head | MTP heads and shared trunk |
|---|---|---|
| Standard MTP | CE gradient | CE gradient |
| KL-MTP | KL gradient | KL gradient |
| Soft-MTP | CE gradient | KL gradient |
Table 1: Gradient routing under different MTP objectives.
Empirical Validation / Results
Experimental Setup
- LLaMA-style models from 167M to 1.2B parameters
- DeepSeek-style sequential MTP architecture with heads
- Trained on FineWeb-Edu for 60,000 steps with 0.5M tokens/batch, 2048 sequence length (~31.5B tokens)
- Muon optimizer with update-RMS rescaling
1. The Residual Interferes with Learning
Key findings (Figure 3):
- The residual has ~4× lower SNR than the KL component throughout training
- The SNR gap widens with scale: from 4.1× at 167M to 4.6× at 1.2B
- Despite low SNR, the residual accounts for ~80% of the MTP gradient reaching the shared trunk
The residual is anti-aligned with NTP optimization (Figure 4a): steps along decrease NTP loss, while steps along increase it. Soft-MTP achieves lower NTP loss, with the gap widening at scale, and lower MTP loss from 689M onward.
2. Soft-MTP Outperforms Standard MTP
Speculative decoding (Table 2): Soft-MTP improves acceptance length by 1.8–2.2% and speedup by 1.4–1.5% at every scale, across FineWeb-Edu, Wikipedia, Books, Science, and Math domains.
Zero-shot downstream performance (Table 3): Soft-MTP improves average accuracy over standard MTP at every scale, with gains growing from ~0.1 points at 167M/332M to ~0.5 points at 689M/1.2B. At 1.2B, Soft-MTP surpasses NTP in average accuracy and achieves best WikiText and LAMBADA perplexity.
Math and code fine-tuning (Table 4): Soft-MTP leads standard MTP in seven of eight cells and is the only objective that never falls below the NTP baseline:
- Code: +3.1 percentage points on HumanEval at pass@64
- Math: +1.1 points on GSM8K and +1.8 points on MATH-500
Hyperparameter robustness (Figure 5): Soft-MTP Pareto-dominates standard MTP across MTP weights and horizons .
3. Soft-MTP vs. KL-MTP Efficiency
Training cost (Table 5): Soft-MTP has identical FLOPs, MFU, and fused-CE peak memory to standard MTP (throughput within 0.07%), while KL-MTP adds 1.5% FLOPs, lowers throughput by 5.6%, and raises peak memory by 21 GB.
Performance comparison (Table 6): Soft-MTP ties or wins on every perplexity metric, has higher average zero-shot accuracy, and beats KL-MTP on all six code fine-tuning metrics. KL-MTP leads in math fine-tuning.
Why keep CE at the output head: KL-MTP's self-distillation gradient fits the head to the model's own predictions, creating a shortcut where the KL can be reduced by making the readout less sensitive to MTP/NTP hidden state differences. The effective rank of the logit map shows: standard MTP collapses to 131 vs. NTP baseline 496, KL-MTP to 321, while Soft-MTP stays closest at 437.
Theoretical and Practical Implications
Theoretical Implications
-
Gradient decomposition insight: The MTP cross-entropy gradient inherently contains a self-distillation signal, providing a new theoretical understanding of why MTP improves speculative decoding.
-
Bias-variance tradeoff: Removing the residual trades unbiasedness for variance reduction. This tradeoff becomes increasingly favorable at scale because the bias term (NTP error) shrinks while the variance term (one-hot sampling noise) is irreducible.
-
KL gradient–recovery is general: The trick applies more broadly whenever a teacher and student share a linear output head—including post-training methods like MTP Boosting, on-policy self-distillation, and score centering for off-policy RL.
Practical Implications
-
Free lunch for MTP optimization: Soft-MTP is a one-line code change with no measurable overhead, compatible with fused cross-entropy kernels and standard parallelism (data parallelism, ZeRO, expert parallelism, pipeline parallelism).
-
Compatibility with parallelism: Only sequence sharding (ring attention, sequence parallelism) needs extra communication—a backward-pass exchange of at most hidden-state gradients per shard boundary, independent of sequence length.
-
Frontier-scale relevance: The trick avoids vocabulary-sized tensors, making it preferable to explicit self-distillation, especially for models trained without tensor parallelism (e.g., DeepSeek-V3).
Conclusion
The paper demonstrates that the standard MTP cross-entropy gradient can be decomposed exactly into:
- : A KL self-distillation term pulling MTP heads toward the model's own next-token distribution
- : A residual carrying most of the gradient but with low signal-to-noise ratio, working against next-token learning
The KL gradient–recovery trick removes this residual by recovering the KL term exactly from existing cross-entropy gradients. Soft-MTP implements this with a one-line code change that:
- Adds no parameters
- Incurs negligible overhead
- Remains compatible with fused cross-entropy kernels
- Works with both DeepSeek-style and Meta-style MTP architectures
Future directions: The paper questions whether MTP will remain in frontier pre-training (noting DeepSeek-V4.1-Flash dropped it for post-trained drafter DSpark), but emphasizes that the KL gradient–recovery trick applies broadly beyond MTP—wherever a teacher and student share a linear output head, the forward KL gradient can be recovered from cross-entropy gradients, opening new avenues for efficient self-distillation methods in post-training and reinforcement learning contexts.
Related papers
- Not All Thinking is Created Equal: Latent Reasoning Discovers a Recurrent Search Algorithm for Depth Generalization
Latent reasoning models discover a generalizable recurrent forward-search algorithm, while token-based methods like CoT rely on local shortcuts that fail out-of-distribution.
- SWE-Stream: Scaling Executable Training Data for SWE Agents via Progressive Construction and Elastic Streaming
SWE-Stream's progressive task construction and elastic streaming pipeline yields 80,874 executable SWE tasks, achieving 69.0% on SWE-bench Verified with 1.45x throughput over batch methods.
- MetaCurate: Evolving Curation Filters for High-Quality Agentic Coding Data
MetaCurate evolves executable curation filters via pairwise LLM feedback, achieving state-of-the-art SWE-bench scores without model training and at 3.5x lower search cost.