The cost and the next few tokens
Attention cost and training objectives are separate concerns. Multi-token prediction changes what the model learns to forecast. Its future guesses require verification before they can become a valid continuation.
#Section 1Why modify standard attention
Double the input from 8 tokens to 16, and a full attention score grid grows from 64 entries to 256. A long-context decoder pays for those relationships even when most are unhelpful.
Quadratic attention cost
Dense attention lets each query compare with every allowed key. In a causal decoder, position sees only current and earlier positions, giving T(T+1)/2 pairs, while a naively materialized score tensor has T² entries per head.
Read this as the allowed causal pairs equal the sum of the visible prefix lengths. At 8 tokens there are 36; at 16 there are 136.
KV-cache growth and long-context limitations
The KV cache retains past keys and values and grows with history. Fitting a longer context in memory does not establish useful long-range behavior; that needs training and evaluation.
Training efficiency
Training efficiency is the quality obtained for a compute and memory budget. FlashAttention cuts memory traffic and never materializes the score matrix, but it still computes exact dense attention, so the arithmetic stays quadratic. FlashAttention paper.
Sparse attention changes which relationships exist. Compressed and latent memory change what is stored. Multi-token prediction changes the loss. Keep them separate before comparing results.
#Section 2Multi-token prediction
At the prefix "the bolt is," ordinary training asks for the next token. An extra objective can also ask what comes after that, pushing the shared representation to support a longer continuation.
Standard next-token prediction and predicting several future tokens
Next-token prediction learns the distribution of the immediate next token. Multi-token prediction, abbreviated MTP, adds objectives for several future positions, for example through a shared decoder trunk with one prediction head per offset.
Multiple prediction heads and auxiliary objectives
A prediction head maps a shared representation to an output distribution. An auxiliary objective adds a target beyond the primary one. Heads need separate transformations: the same tied output matrix on the same hidden state gives the same logits.
Gloeckle and colleagues proposed shared-trunk independent future heads in 2024. DeepSeek-V3 instead chains sequential prediction modules conditioned on shifted ground-truth token embeddings. MTP paper, DeepSeek-V3 report.
Loss weighting and training signal
With future offset and nonnegative weight , one possible sum is
Read this as the MTP loss sums weighted losses over future offsets. is the offset- head's distribution and counts positions that have an in-sequence target at that offset.
State whether the weighted loss is a sum or a normalized average; the convention changes the reported value.
Inference implications
MTP may improve the shared representation even when inference uses only the next-token head. Extra heads can also propose drafts, but proposal cost, acceptance, and verification decide whether decoding gets faster.
#Section 3MTP and speculative decoding
A head predicts red after “the bolt is,” but the target model favors blue. Writing red directly would change the model being sampled, so future prediction needs a verification rule.
Drafting future tokens and verification
A draft is a proposed continuation that a target model checks. Verification evaluates the target’s probabilities or greedy choices at each draft position under the proper causal prefix.
Accept/reject behavior
For greedy verification, accept the draft prefix that agrees with the target’s greedy choices and replace the first mismatch with the target’s choice. Candidates after the mismatch were conditioned on a wrong prefix and are discarded. Exact stochastic sampling needs acceptance probabilities and a residual distribution, derived in Section 19.
? marks a target choice that must be recomputed under the corrected prefix.Relationship between MTP and faster decoding
MTP is a training design; speculative decoding is an inference algorithm. Independent marginal forecasts are not the joint proposal that sequential drafting gives, so candidate construction and verification must be specified together.
A round may emit several verified tokens, but its speed depends on acceptance and the cost of proposing and checking them.