What Is Speculative Decoding? Faster LLM Output, Same Answers
By LatestLLM Editorial · Published · Facts verified · 9 min read
Also called: speculative sampling, draft model, multi-token prediction, MTP, assisted generation, lookahead decoding
Before this: Next-token prediction, Latency and throughput
In one line
Speculative decoding speeds up generation by letting a cheap draft guess several tokens ahead and having the large model verify them all in one pass, without changing the output distribution.
Speculative decoding, simply and technically
In plain English
A large model writes one word at a time, and each word takes a full pass through the model. Speculative decoding adds a helper. A small, fast model guesses the next several words. The large model then checks all of those guesses together in a single pass, keeps the ones it agrees with, and writes the first word it disagrees with. When the helper guesses well, several words are produced for the price of one big-model step.
The surprising part is that the final text is the same as if the large model had written it alone: the check is designed so that wrong guesses are always thrown out and the large model's own choices always win. It saves time, not quality.
Think of it like this: Speculative decoding works like a junior writer drafting a few sentences that a senior editor checks in one read. The editor accepts the sentences as written up to the first one she would have written differently, rewrites that one, and the junior drafts again from there. When the junior is usually right, the editor approves several sentences per read, so the article is done much sooner. The editor's reading time is the same either way; what changes is how many sentences each reading approves.
Everyday example: Checking four guesses at once
A small helper guesses the next four words of a sentence: “capital of France is Paris”.
Input:
Helper's draft: of / France / is / Paris
Output:
Accepted: 3 words. Big model adds the 4th. Total: 4 words in one step
What it shows: The large model checks all four at once. If it agrees with the first three but would have said something different for the fourth, three words are accepted and the large model supplies the fourth itself. That is four words from one big step, instead of one word per step.
Technically
Leviathan et al. (2023) and Chen et al. (2023) introduced the algorithm independently. A draft model q proposes γ tokens autoregressively; the target model p scores all γ + 1 positions in one parallel forward pass. Each draft token x is accepted with probability min(1, p(x)/q(x)); at the first rejection a token is resampled from the normalised residual max(0, p − q), and if all γ are accepted one extra token is sampled from p. This modified rejection sampling preserves the target's distribution exactly, so outputs are unchanged in distribution. Chen et al. report a 2 to 2.5 times decoding speedup on Chinchilla 70B and Leviathan et al. 2 to 3 times on T5-XXL.
With acceptance rate α per token (assumed independent), the expected number of tokens per target step is (1 − α^(γ+1)) / (1 − α), and the wall-clock speedup is (1 − α^(γ+1)) / ((1 − α)(γc + 1)), where c is the cost of one draft step relative to one target step (Leviathan et al., Theorem 3.8). A draft that is cheap and accurate helps most. DeepSeek-V3's multi-token-prediction module can serve as the draft: the second token is accepted 85 to 90% of the time and the paper reports 1.8 times faster decoding.
Technical example: The speedup formula in numbers
Expected tokens per step and wall-clock speedup from the Leviathan et al. formulas, for draft costs c of 0.05 and 0.5, and DeepSeek-V3's reported acceptance rate.
Code (python):
def expected(alpha, gamma):
return (1 - alpha ** (gamma + 1)) / (1 - alpha)
def speedup(alpha, gamma, c):
return expected(alpha, gamma) / (gamma * c + 1)
for alpha in (0.6, 0.8, 0.9):
row = ", ".join(f"gamma={g}: {speedup(alpha, g, 0.05):.2f}x" for g in (1, 3, 5, 8))
print(f"alpha={alpha}, c=0.05 {row}")
print("alpha=0.8, gamma=4, c=0.5:", round(speedup(0.8, 4, 0.5), 2), "x (an expensive draft barely helps)")
print("tokens per step at alpha=0.87, gamma=1:", round(expected(0.87, 1), 2))
Output:
alpha=0.6, c=0.05 gamma=1: 1.52x, gamma=3: 1.89x, gamma=5: 1.91x, gamma=8: 1.77x
alpha=0.8, c=0.05 gamma=1: 1.71x, gamma=3: 2.57x, gamma=5: 2.95x, gamma=8: 3.09x
alpha=0.9, c=0.05 gamma=1: 1.81x, gamma=3: 2.99x, gamma=5: 3.75x, gamma=8: 4.38x
alpha=0.8, gamma=4, c=0.5: 1.12 x (an expensive draft barely helps)
tokens per step at alpha=0.87, gamma=1: 1.87
What it shows: With a cheap draft (c = 0.05) the speedup runs from 1.5 to 1.9 times at α = 0.6 and from 1.8 to 4.4 times at α = 0.9, and at α = 0.6 longer drafts stop paying off (1.91 times at γ = 5, 1.77 at γ = 8) because a rejection becomes likely. An expensive draft (c = 0.5) leaves a speedup of only 1.12 times even at α = 0.8. At α = 0.87 and one drafted token, 1.87 tokens per step is the upper end before the module's own cost, consistent with the measured 1.8 times.
Draft, then verify
In plain English: The trick relies on a fact about big models: checking several words at once costs almost the same as producing one, because the card was waiting for memory anyway. So it is cheaper to have a helper guess the words and let the big model check them in bulk.
Technically:
Parallel scoring of a short continuation by the target model has latency comparable to sampling a single token, since decoding is memory-bound and the weights are read once either way. Speculative decoding exploits this spare compute: the draft proposes γ tokens, and the target scores the prompt plus the draft in one pass, producing γ + 1 distributions.
The draft can be a much smaller model from the same family, a distilled model, a few extra layers or heads on the target itself, or in the simplest case an n-gram match against the prompt. Whatever the source, it only has to be cheap and often right.
Why the output is unchanged
In plain English: Every guess is checked against what the large model would have wanted. A guess survives only if the large model agrees with enough probability; otherwise it is replaced by a draw from the large model's own distribution. The large model therefore always has the last word.
Technically:
For a draft token x with draft probability q(x) and target probability p(x), accept with probability min(1, p(x)/q(x)). On rejection, sample from the residual distribution proportional to max(0, p − q), which exactly compensates for the tokens the draft over-proposed. The result is a sample from p, so quality is unchanged in distribution; Chen et al. describe this as a modified rejection sampling scheme that preserves the distribution of the target model within hardware numerics.
The same scheme works with any sampling settings, including temperature and top-p, as long as the same transformed distribution is used for p and q.
What is rejection sampling?
A way to draw from a target distribution by proposing from an easier one and accepting each proposal with a probability that corrects for the difference.
The speedup formula
In plain English: How much faster it gets depends on three things: how often the helper is right, how many words it guesses at a time, and how costly the helper is compared with the big model. A good helper is both accurate and tiny.
Technically:
If each draft token is accepted with probability α independently, the expected number of tokens per target step is the geometric sum (1 − α^(γ+1)) / (1 − α). At α = 0.8 and γ = 4 that is 3.36 tokens per step. Dividing by the cost of γ draft steps plus one target step, γc + 1, gives the wall-clock speedup. If α > c, some draft length gives an improvement (Corollary 3.9), and a draft that is inaccurate or expensive can instead slow generation down.
Because acceptance varies with the text, predictable passages such as code boilerplate, quotations or structured output accept more tokens and speed up more than free-form creative text. The i.i.d. assumption is an approximation, so measured gains differ from the formula.
Where it is used
In plain English: Many inference engines include it, and some model makers ship a built-in helper so no separate draft model is needed.
Technically:
DeepSeek-V3 trains a multi-token-prediction module that predicts one extra token; used as the draft, the paper measures 85 to 90% acceptance of the second token and 1.8 times faster decoding, though DeepSeek's reference code does not run it, so whether a service uses it depends on its software.
Speculation helps most at small batch sizes, where decoding is memory-bound. At large batch sizes the GPU is already busy, so extra verification work competes with useful work and the benefit shrinks.
Everyday example: Busy kitchen
A kitchen already cooks for a full dining room.
What it shows: Having an assistant pre-cook guesses that the head chef then checks barely helps, because the chef was never idle. Speculative decoding likewise helps most when the hardware has spare capacity, such as when serving a single user.
Common misconceptions
Myth: Speculative decoding makes the model less accurate because a smaller model is involved.
Reality: The small model only proposes. The verification step guarantees that the output follows the large model's distribution.
Myth: It always makes generation faster.
Reality: A draft that is too expensive or rarely accepted can make it slower. It helps most when decoding is memory-bound and drafts are accurate.
Myth: It needs a second, separately trained model.
Reality: Drafts can come from heads or modules on the target model itself, such as DeepSeek-V3's multi-token-prediction module, or from simple prompt n-gram matching.
Where you'll see this
- DeepSeek-V3 architecture: DeepSeek-V3's 11.5B-parameter multi-token-prediction module can draft one extra token with 85 to 90% acceptance, for 1.8 times faster decoding.
Key takeaways
- A cheap draft proposes several tokens and the large model checks them in one pass, so verified tokens come out faster than one per step.
- Modified rejection sampling keeps the output distribution identical to the target model's, so speed rises with no change in quality.
- Speedup depends on the acceptance rate α, the draft length γ and the draft's relative cost c; reported gains are 2 to 3 times for large models.
- DeepSeek-V3's multi-token-prediction module gives 85 to 90% acceptance of its second token and 1.8 times faster decoding.
Frequently asked questions
What is speculative decoding?
A technique where a fast draft proposes several tokens and the large model verifies them in one forward pass, keeping the accepted ones, to generate text faster without changing the output distribution.
Does speculative decoding change the answers?
No. Modified rejection sampling makes the output follow exactly the large model's distribution.
How much faster is it?
Papers report 2 to 3 times on large models, such as 2 to 2.5 times on Chinchilla 70B; the gain depends on how often drafts are accepted and how cheap the draft is.
What is acceptance rate?
The fraction of drafted tokens the large model accepts. DeepSeek-V3 reports 85 to 90% for its second token.
When does speculative decoding not help?
When the draft is expensive or often wrong, or when the server is already compute-bound at large batch sizes.
Sources
Facts last verified November 23, 2026.
- Leviathan et al.: Fast Inference from Transformers via Speculative Decoding (arXiv)
- Chen et al.: Accelerating Large Language Model Decoding with Speculative Sampling (arXiv)
- DeepSeek-AI: DeepSeek-V3 Technical Report (arXiv)
- Gloeckle et al.: Better and Faster Large Language Models via Multi-token Prediction (arXiv)