A drafter built into the model
The Speculative · Draft tab speeds up decoding with a separate small model that proposes tokens for the large one to check. Multi-token prediction (MTP) builds the drafter into the model. Besides the usual head that predicts token , the model is trained with an extra layer that predicts token from position . At inference that layer is a draft model costing one small block, with no second model, tokeniser or weights file to keep in step.
The page records MiMo-7B-RL: a 36-block decoder of 7,622,619,136 parameters plus one MTP layer of 210,790,400 parameters, which reuses the main model's embedding and unembedding. The input is GSM8K test question 1 (Janet's ducks) in MiMo's chat template, 78 tokens, followed by the model's greedy reply, recorded in bfloat16 on the Mac's GPU. The reply is capped at 320 tokens and stops before the reasoning reaches the answer.
The MTP layer
At position the layer reads two inputs: , the main model's last block output before the final norm, and , the embedding of the next token. It normalises each with its own RMSNorm, concatenates them (8192 numbers) and projects back to 4096 with one bias-free matrix, input_proj. Then it runs one ordinary decoder block of its own and a final RMSNorm, and the main model's unembedding gives a distribution over token :
The MTP input column shows the two norms, the concatenation and . The block's MTP Self Attention has 32 query heads sharing 8 key/value heads of 128 dimensions, with RoPE (base 640,000); it attends over the earlier positions' MTP inputs, its own KV cache. Its MLP is SwiGLU, 4096 → 11008 → 4096.
The next-token embedding matters. carries the model's distribution over token but not which token was actually chosen; given that token, the layer's job is to predict the token after a known one. This is the sequential MTP module of DeepSeek-V3, which keeps the causal chain intact. Gloeckle et al.'s original design instead predicted in parallel with independent heads on one shared trunk. Following vLLM, the trace feeds the state from before the final norm; fed the state after it, the layer matches 271 times instead of 284.
How often the guess is right
A teacher-forced pass over the prompt and the reply gives, at every position, the main head's distribution for and the MTP layer's for . The MTP's guess vs the model's own token two ahead strip colours each token of the reply by whether the MTP layer's top guess, made two positions earlier, was right: 284 of 319 positions, 89 %.
The Probabilities column shows one miss. After “.” the main head gives “So” 49.97 %. Given “So”, the MTP layer puts 43.82 % on “ subtract”, but the model went on to write “ she”, which the layer had at 20.70 %. Both are plausible continuations; the guess is wrong, not nonsensical.
Speculative decoding with one MTP layer
Each main pass runs two positions: the last accepted token and the MTP layer's guess for the token after it. The main model's output at the first position checks the guess. If equals its arg-max, the guess is kept and the output at the second position gives one more token for free; otherwise only the main model's own token is emitted and the cache is cropped. Either way the MTP layer then makes the next guess.
The Speculative decoding with the MTP layer panel draws one box per main pass. The run produced 321 tokens in 169 main passes (1.90 per pass), keeping 152 of 168 guesses (90 %); its first 320 tokens are identical to plain greedy decoding, which needs one main pass per token. In this one run on a shared Mac, wall time fell from 24.3 s to 15.3 s.
For comparison the panel quotes the Draft tab: 3.56 tokens per target pass with 4 drafts from a separate 0.5B model, 64 % kept. The prompt, models and length differ, so the figures are not like for like. One guess per pass caps this page at 2 tokens per pass however good the guesses are; a separate drafter can propose several tokens per round, as the Draft tab's proposes four.
Where it came from
Stern, Shazeer and Uszkoreit's blockwise parallel decoding (2018) added heads that predict several future tokens and kept the longest prefix the model itself verified. Gloeckle et al. (2024) trained language models with multi-token prediction as an auxiliary loss, found gains in sample efficiency, especially on code, and decoded up to 3 times faster with self-speculative decoding. DeepSeek-V3 made the extra predictions sequential modules, used them as a training objective, and could reuse them for speculative decoding. MiMo-7B was pre-trained with an additional MTP objective for both reasons, better performance and faster inference.
The Efficiency explainer's Medusa and EAGLE tabs add drafting heads to a model after it is trained, and LayerSkip drafts with the model's own early layers.
Papers
- Better & Faster Large Language Models via Multi-token Prediction Multi-token prediction as a training objective, with extra heads that also serve as a built-in drafter.
- DeepSeek-V3 Technical Report Sequential MTP modules that combine the previous state with the next token's embedding, the design MiMo's layer follows.
- MiMo: Unlocking the Reasoning Potential of Language Model -- From Pretraining to Posttraining MiMo-7B, the model this page records, pre-trained with an MTP objective and decoded speculatively with its MTP layer.
- Blockwise Parallel Decoding for Deep Autoregressive Models Predicting several future tokens in parallel and keeping the longest prefix the model verifies.
- Fast Inference from Transformers via Speculative Decoding Draft-and-verify decoding with a separate model, the scheme of the Draft tab that this page compares with.