A story: the student who only guesses one word
Picture a student learning to write, asked the same single thing in every exercise: "Here is the start of a sentence, guess the next word." Word after word, billions of times. They will eventually write well. But the instruction is poor: at each step they only plan one step ahead. They optimize the very next word, never the rest of the sentence.
Change the instruction: "Here is the start of a sentence, guess the next four words." Suddenly the student has to anticipate, to hold a slightly more distant goal in mind. That is the idea of multi-token prediction, often abbreviated MTP: instead of training a large language model (LLM) to predict a single next token, you train it to predict several in parallel.
That change of instruction has two consequences, one at training time and one at inference time, and it is the double benefit that makes the idea interesting.
What came before: next-token prediction
A standard LLM is trained by next-token prediction: you show it a sequence of text, and at every position it must predict the token that comes at . Its error is measured by a cross-entropy:
The symbols, one at a time. is the loss, the number we try to make as small as possible; the subscript 1 is a reminder that we aim only one token ahead. is the token that actually appears at position in the training text. is everything before it, the context. (theta) stands for the model's parameters as a whole, and for the probability the model, with those parameters, assigns to the token in question. is the logarithm and the sum over every position in the text.
Where does the minus sign come from? The logarithm of a probability is always negative (a probability is at most 1, whose logarithm is 0). The minus flips it the right way up, so that a small loss means a good prediction.
In one sentence: the loss grows the lower the probability the model gave to the word that actually appeared, position after position.
Simple, effective, and the foundation of every LLM. But it has two well-identified limits.
1. A sparse learning signal. At each position the model gets just one error signal: "the right next token was this one." It learns a local, myopic decision. Much of the long-range structure (building a sentence, an argument, a code function) is never rewarded directly. The signal is said to be sparse: little learning is extracted from each token seen.
2. Slow sequential generation. At inference, since the model can only produce one token at a time, generating 100 tokens takes 100 successive traversals, each waiting on the previous one. And each traversal re-reads all the weights from memory: that is the bandwidth bottleneck described in Quantization: the concepts.

With next-token prediction, guessing is often easy and purely local: grammar, an obvious ending, an expected word. The model can do that task well without ever anticipating what follows. By also asking for , , , you force it to pack into its internal state information useful for several steps ahead, that is, to plan better.
The arrangement: a shared trunk, several heads
You keep the body of the Transformer as it is (the authors call it the trunk) and attach several prediction heads to the same internal representation that the trunk produces. Head 1 predicts (as usual), head 2 predicts , and so on.
The detail that matters, and that separates this from Medusa: each head is a full Transformer block, but all the heads share the same output matrix, the one that turns an internal representation into probabilities over the vocabulary. Since that matrix is by far the biggest piece (vocabularies run to tens of thousands of words), sharing it changes everything about the parameter cost. Medusa, by contrast, gives every head its own output matrix, which is why its heads cost around 10 % of the model.
As always, keep straight what is learned and what is computed: the heads and the output matrix are learned parameters, frozen after training; the representation is a computed result for the text at hand.
The loss becomes a sum over horizons:
Only one new symbol: is the number of tokens we ask it to foresee, and runs over the horizons from 1 to . Reading it back: at each position, the error is counted not on one token but on the that follow, each predicted from the same context. The signal is times denser, and the trunk is forced to produce a representation that already contains enough to anticipate several words.
The authors present their architecture as having no time or memory overhead, and the trick is worth spelling out. The potential problem: for each head, computing probabilities over the whole vocabulary produces a very large array of numbers, and holding all those arrays at once would blow up memory. The fix is simply to process the heads one after another, compute the first, extract what is needed, free the memory, move to the second. Peak memory stays that of a single head.

What the authors measured
The headline numbers from the paper's abstract, with their conditions. On 13-billion-parameter models, multi-token prediction solves 12 % more problems on HumanEval and 17 % more on MBPP than a comparable next-token model. Read those carefully: they are relative percentages, 12 % more problems solved, not 12 percentage points. Averaged out, the authors speak of roughly 15 % more code problems. HumanEval and MBPP are two sets of programming exercises: the model is given a function's specification, its code is executed, and you count the cases where the tests pass.
Three further results, all from the same paper:
- The benefit grows with model size. On the smallest models tested (a few hundred million parameters), multi-token prediction is actually harmful on code generation. Only from several billion parameters onwards does it start paying off, and the gap then widens. That is the lower chart in the figure above.
- Four is the right horizon, in their setting. The authors tried and on 7-billion-parameter models trained on 200 billion tokens of code. wins consistently. Beyond that, the far-ahead heads learn poorly and return nothing.
- The horizon depends on the unit being predicted. When the model is trained not on tokens but on individual bytes (much smaller units, therefore much easier to guess ahead) becomes optimal. The right horizon is not a universal constant: it tracks how predictable the unit is.
A word on the metric: the paper uses pass@k, meaning "did the model solve the problem within attempts?". Pass@1 is therefore the first-attempt success rate, the strictest measure.
Two clearly distinct uses
"Predict several tokens" actually serves two goals that must be kept apart.
Use 1, Train a better model
Here the point is not speed but quality. Asking the model to anticipate densifies the signal and forces it to structure its internal state better. That is the core contribution of Meta's paper. At inference you can then throw the extra heads away and use only the one predicting : the model behaves exactly like an ordinary LLM, but a better one, because it was better trained. The heads were only scaffolding.
Use 2, Speed up inference
If you keep the heads, they hand you a proposal several tokens ahead for free. That is precisely what speculative decoding needs: a draft of candidates the model then verifies in a single traversal, accepting only those matching its true distribution. Since the draft comes from the model itself, this is called self-speculative decoding.
For a model trained with , the authors report inference up to 3× faster, and (this is the remarkable part) including at large batch sizes. That is unusual: most speculative techniques lose their point as soon as many requests are stacked up, because the chip is no longer idle (see batching).
A model trained with multi-token prediction is, by construction, its own proposer. No second model to obtain, no graft to perform after the fact. Since verification is that of speculative decoding, it can preserve the model's distribution exactly: see Speculative decoding for the acceptance-test mechanism.
Three cousins not to be confused
Three techniques add prediction heads to a model. They differ in when the heads are added and in what for.
| Speculative decoding | Medusa | Multi-token prediction | |
|---|---|---|---|
| When | at inference only | after training | from pre-training onwards |
| Primary goal | speed | speed | model quality |
| Where the draft comes from | a separate second model | grafted heads, frozen model | the model's native heads |
| Output matrix | the small model's own | one per head, costly | shared across heads |
| Do predictions condition each other? | yes | no | no (Meta version), yes (DeepSeek version) |
The line to remember: multi-token prediction is first of all a change to the training objective, with acceleration as a side effect. Medusa and speculative decoding leave untouched the way the model learned.
How DeepSeek-V3 uses it
DeepSeek-V3 is the most visible instance of multi-token prediction at very large scale, and it introduces an important variant: sequential modules rather than parallel heads.
The idea fixes exactly the weakness of parallel heads. Instead of predicting blind, without knowing what was predicted for , you chain small modules. The module at depth predicts token taking the previous module's prediction into account. The causal chain is preserved: is anticipated knowing what and probably are.
- Main module → predicts , like an ordinary LLM
- Module 1, receiving the main module's internal state → predicts
- Module 2, receiving module 1's internal state → predicts

In the model actually released, DeepSeek-V3 sticks to a single extra module: it therefore predicts two tokens, and . The authors report that the second token is accepted 85 % to 90 % of the time depending on the topic, and that this yields 1.8× more tokens per second. Read the two figures together: the acceptance rate is very high precisely because one token ahead is easy to guess and because the module conditions on the previous prediction.
Two points about their use of it:
- It is a training objective first. The modules serve to densify the signal during pre-training and improve the final model.
- They can then be discarded or kept. Discarded, you get an ordinary LLM that was better trained. Kept, they supply the draft for speculative decoding.
At Meta the heads predict in parallel from the same internal state: simple, with no overhead, but each head guesses without seeing the others, the same weakness as Medusa. DeepSeek-V3 chains the modules to restore the causal dependency, at the cost of a little more computation. It is the same trade as between Medusa and EAGLE, described in the Medusa lesson.
Trade-offs and limits
- The benefit depends on scale. On small models the measured effect on code generation is negative. This is not a universal technique: it is a large-model technique.
- The horizon must stay short. Uncertainty grows fast with distance: four tokens ahead on text, eight bytes ahead on bytes. Past that you are training heads that learn nothing.
- Parallel heads guess blind. As with Medusa, the far-ahead tokens are the least reliable. DeepSeek's sequential modules fix that, at the price of more computation.
- The inference gain depends on the acceptance rate. On predictable text (code, templates, highly structured answers) many candidates pass. On unpredictable text they are rejected and the gain melts away. The formula tying that rate to the speedup is in Speculative decoding.
- It requires redoing pre-training. That is the heaviest practical limit, and what really separates this technique from Medusa: you cannot add multi-token prediction to an already-trained model without retraining it.
Why it matters
Multi-token prediction illustrates a deep trend: change the training objective and get, in one move, a model that is both better and faster to serve. That is rare. Quantization, pruning and distillation all trade a little quality for speed; here you gain on both counts, at the cost of a pre-training run. Its adoption by DeepSeek-V3 at very large scale made it a notable building block of recent models.
Key points
- Next-token prediction teaches the model only one step ahead: a single error signal per position, and strictly sequential generation.
- Multi-token prediction attaches several heads to a shared trunk, with a common output matrix, and asks the model to aim tokens ahead. The learning signal is times denser.
- Measured figures (Meta, 2024): on 13-billion-parameter models, 12 % more problems solved on HumanEval and 17 % more on MBPP; optimal horizon on code; inference up to 3× faster, including at large batch sizes.
- Two uses: throw the heads away and keep a better model, or keep them and do self-speculative decoding.
- DeepSeek-V3 chains the modules instead of parallelizing them, keeps only one in practice, and reports 85–90 % acceptance of the second token for 1.8× more tokens per second.
- The limit that counts: this is installed at pre-training, not after the fact, unlike Medusa.
1. What is multi-token prediction primarily for, as the Meta paper presents it?
2. The paper reports 12 % more problems solved on HumanEval. How should that figure be read?
3. Should every model, small or large, be trained with multi-token prediction?
4. What do DeepSeek-V3's sequential modules fix compared with Meta's parallel heads?
5. Your team already serves an open-source model and would like to add multi-token prediction to it. What is the right answer?