Speculative Decoding
A large language model inference acceleration technique in which a smaller draft model predicts multiple tokens in advance, which are then verified in batch by the primary model, thereby increasing overall inference throughput.
Core Facts
A higher acceptance rate means the draft model's guesses are more accurate and the large model needs to redo less work, which directly determines the actual speedup achieved by speculative decoding.
MTP is a technique that allows the model to predict multiple subsequent tokens in a single forward pass, reducing the number of inference computation rounds.
The MTP (Multi-Token Prediction) auxiliary training objective allows the model to be used with speculative decoding during inference to improve throughput
Timeline (last 90 days)
In DeepInfer's benchmark test, the draft model acceptance rate for speculative decoding was not measured but assumed at a 75% pass rate for scaling.
DeepSeek-Infer employs Speculative Decoding technology.
The core idea of speculative decoding is "a small model drafts, a large model verifies."
The losslessness of speculative decoding relies on a modified rejection sampling mechanism: for each token proposed by the draft model, the target model computes its probability and decides acceptance or rejection accordingly; once rejected, resampling is done from the difference between the target model and draft model distributions (after normalization).
Speculative Decoding was first proposed by Leviathan et al. in 2022, and its core idea is to have a lightweight draft model quickly autoregressively generate candidate tokens, which the target large model then verifies in parallel in a single forward pass to determine whether these candidate tokens are accepted.
SpecAgent draws on the idea of speculative decoding but makes three modifications: the drafting granularity is raised from tokens to complete tool-call actions; verification is raised from the string level to semantic-level judgment of trajectory legality; and a repair stage is added to give an alternative action for the first rejected step.
Traditional speculative decoding uses rejection sampling or modified sampling, deciding whether to accept a draft token based on the ratio of the draft and target model probabilities, and resampling from the corrected distribution upon rejection, to guarantee that the output distribution is lossless.
The essence of speculative decoding is to predict multiple tokens at low cost and then have the main model verify them in batch; the higher the hit rate, the more valid tokens produced per verification step.
Speculative decoding rapidly generates candidate tokens via a small draft model and then has the main model verify them in parallel, typically achieving a 2–4× speedup, with outputs that are mathematically equivalent to those produced without it and no loss in precision
Speculative Decoding uses a smaller draft model to quickly predict subsequent tokens, which are then batch-verified by the main model, significantly improving overall throughput; MTP is one implementation variant of this, and models such as Qwen support it natively.
32 more timeline events
All Facts (20)
A higher acceptance rate means the draft model's guesses are more accurate and the large model needs to redo less work, which directly determines the actual speedup achieved by speculative decoding.
90%VerifiedMTP is a technique that allows the model to predict multiple subsequent tokens in a single forward pass, reducing the number of inference computation rounds.
90%VerifiedThe MTP (Multi-Token Prediction) auxiliary training objective allows the model to be used with speculative decoding during inference to improve throughput
90%VerifiedSpeculative Decoding uses a small, fast draft model to predict multiple tokens in advance, which are then verified in parallel all at once by the large model.
90%VerifiedThe speculative decoding paradigm was proposed almost simultaneously by teams at Google Brain and DeepMind in 2023.
90%VerifiedSpeculative Decoding is one of the most mainstream inference acceleration approaches for large models, using a small draft model to rapidly generate candidate tokens that are then verified in parallel by the main model.
90%VerifiedThe Flash series reduces computational load by activating only a subset of parameters during each inference through technologies such as MoE architecture and speculative decoding.
80%VerifiedSpeculative decoding guarantees that the final output distribution is completely consistent with pure target-model generation through a rejection sampling protocol.
80%VerifiedThe core idea of speculative decoding is "a small model drafts, a large model verifies."
75%VerifiedThe gains from speculative decoding are diluted in large-batch scenarios, as GPU compute capacity tends to be saturated in such cases.
75%VerifiedThe actionable method for validating a coding model is to select a real repair task with tests, fix the repository version and tool permissions, have candidate models complete the same task, and compare first-pass rate, patch readability, per-run cost, and number of human takeovers.
75%VerifiedStreaming inference involves inference optimization techniques such as speculative decoding and continuous batching.
75%VerifiedThe ability of a large model to actively infer design specifications from platform context technically falls under Contextual Reasoning, which internalizes industry common sense from massive amounts of data rather than relying on hard-coded rules.
75%VerifiedModel compression techniques such as INT8 quantization and channel pruning can increase inference speed by 2–4 times with a precision loss of less than 1% mAP
70%VerifiedSpeculative Decoding technology can deliver a 3–5x speed improvement compared to token-by-token serial generation.
70%VerifiedWhen the draft model prediction accuracy of Speculative Decoding reaches 60–80%, the overall inference speed can be improved by 2–3 times.
70%VerifiedCompared to speculative decoding, MTP's predictive capability is built into the model itself, requiring no additional draft model.
65%VerifiedThe combination of Multi-Token Prediction and speculative decoding can achieve a 2–4x inference speed improvement without compromising generation quality.
65%UnverifiedMTP与DFlash在架构上有本质不同,但都属于投机解码技术谱系
85%UnverifiedMTP和Speculative Decoding两项技术理论上可以叠加使用
75%