Speculative Decoding
The Power Plant · Inference & ServingA small model drafts tokens and the big model checks them in one pass, for faster output.
Also called: draft model, multi-token prediction, MTP, EAGLE, medusa heads. In the glossary.
Speculative Decoding is cooling this week (×0.36 against the eight weeks before). What is moving.
How it works, as a machineThe Copyist's Studio · draft blocks
Follow one draft block from the last accepted token to a longer text the target has signed, in a music copyist's studio with the composer's check desk beside it.
- Draft four tokens
- Score the whole block
- Count the matches
- Write its own token
- Pin the longer prefix
Speculative Decoding in plain words
Speculative decoding speeds up a large model by letting a small one guess the next few tokens. The large model checks the guesses in a single pass and keeps the ones it agrees with. The output is the same as the large model's own, and arrives faster whenever the guesses are good.
An analogy
A junior clerk drafting the next lines of a letter while the senior partner reads behind. The partner approves a run of lines at a glance and rewrites from the first line that is wrong. The letter is exactly what the partner would have written, finished sooner when the junior is right.