Multi-Token Prediction
A training objective that asks each position to predict several future tokens through independent output heads on a shared model trunk.
Multi-token prediction is a language-model training objective where each position predicts the next N future tokens at once, using independent output heads on a shared trunk, instead of predicting only the single next token.
At a glance
Released
April 2024
Authors
Fabian Gloeckle, Badr Youbi Idrissi, Baptiste Rozière, et al.
Optimizes
- Sample Efficiency
- Code Generation
- Inference Speed
- Next Token Prediction
What It Is
Multi-token prediction is a training objective for decoder language models. At each token position, the model still reads the same prefix of earlier tokens, but it is trained to predict several future tokens instead of only the next one. Each future offset gets its own output head on top of the same shared trunk, so the heads stay independent even though they read the same hidden state.Why It Exists
Standard next-token prediction gives the model one supervised target per position. Multi-token prediction adds more future targets from the same context, which the paper argues can improve sample efficiency during pretraining and can optionally speed up inference when the extra heads are reused for self-speculative decoding.How It Works
The baseline next-token objective trains one output head to predict token t+1 from the hidden state at position t. Multi-token prediction keeps that shared trunk but adds N independent heads that predict offsets t+1 through t+N from the same hidden state. During training, each head is scored against its matching future token, and the losses are combined. At inference time, the model can still generate with the primary next-token head, or use the auxiliary heads when a serving stack wants draft-and-verify style speedups.Context prefix x_{≤t}Shared trunk h_tHead k = 1Target x_{t+1}Head k = 2Target x_{t+2}Head k = NTarget x_{t+N}N independent heads on one shared trunkContext prefix x_{≤t} to Shared trunk h_tShared trunk h_t to Head k = 1Shared trunk h_t to Head k = 2Shared trunk h_t to Head k = NHead k = 1 to Target x_{t+1}Head k = 2 to Target x_{t+2}Head k = N to Target x_{t+N}
Math Or Compute Schema
Both objectives read the same prefix and shared hidden state h_t at position t. The next-token objective supervises one future token. The multi-token objective averages the same style of loss across offsets 1 through N, with each offset using its own output head on h_t.- Token at position t.
- Hidden state at position t from the shared trunk.
- Number of future offsets supervised at each position.
- Future offset index from 1 to N.
- Observed token k steps ahead of position t.
- Prefix tokens up to position t.
- Shared trunk parameters plus independent head parameters.
- Conditional distribution from output head k on h_t.
Compared To Nearby Modules
Next-token pretraining is the usual baseline objective: each position supervises one future token at offset t+1. Multi-token prediction changes training by adding independent heads for offsets t+2 through t+N from the same hidden state. Ordinary multi-step generation is different: at inference the model still emits one token per step and re-runs the trunk as the prefix grows, unless a serving stack uses auxiliary heads for drafting. Speculative decoding is an inference-time serving technique that can reuse MTP auxiliary heads, but ordinary generation can still rely on the primary next-token head alone.| Comparison dimension | Next-token pretraining | Multi-token prediction | Speculative decoding |
|---|---|---|---|
| Prediction targets per position | One future token at offset t+1 | N future tokens at offsets t+1 through t+N | Draft tokens proposed then verified by the main model |
| Training-time role | Default pretraining objective for decoder language models | Auxiliary objective with independent heads on a shared trunk | Not a training objective by itself |
| Inference-time role | Standard autoregressive next-token generation | Can keep the primary next-token head or reuse auxiliary heads for self-speculative decoding | Serving technique that can accept drafts from MTP heads or a separate draft model |