Speculative Decoding: Draft Models, Draft Length, and Trees
Draft source, proposed length, and verification shape determine the trade-off between speed, GPU memory, and training. This article compares the main choices and reports small laptop tests.
Every variant lets the target model check the draft. With greedy decoding, the practical differences are speed, memory, and training cost.
Where the draft comes from
A separate draft model
A separate small model is the original form [1]. It needs no training, but must share the target model's tokenizer and uses about 1.3 GB of GPU memory in my laptop experiment.
The target model's own layers
Self-speculation drafts with some target-model layers, so no second model is stored. Draft & Verify skips selected layers without training; LayerSkip trains the model so early layers can predict the next token [2].
In one short Qwen3-14B test, untrained drafts from the first 4 or 8 of 40 layers had no accepted tokens [8]. That result applies to this configuration; it does not test trained early exit.
Extra prediction heads
Medusa adds trained output heads. EAGLE trains an extra layer to predict the next internal representation [3]. Both avoid a separate draft model but require training for each model.
Text already in the prompt
Prompt lookup decoding proposes text that already followed the same phrase in the input; it suits repeated input such as summaries or code edits. Lookahead decoding generates and checks short target-model candidates in parallel [4].
How many tokens to draft
Fixed speculation drafts the same 8 tokens in every round. Adaptive methods stop when a rejection appears likely; SpecDec++ and DISCO report modest gains over fixed length [5].
For streamed inference, the trade-off differs: a wasted draft token costs milliseconds, while a target-model pass costs about 20 s. Stopping early can save little while giving up tokens that the pass could have checked.
My measurements agree. I tested three adaptive policies on Qwen3-14B against a fixed draft length [8]:
- Policy 1A learning policy that adjusts k after each round cut k to 1 after a few rejections and was slower than the fixed draft: 7.7 against 7.2 s per token, on one prompt with 16 sampled tokens.
- Policy 2A threshold policy tied with the fixed draft, within the run-to-run noise of the same test.
- Policy 3A stopping policy that weighs rejection risk against drafting cost was slower on the four prompts: 9.8 against 9.2 s per token.
In these small streamed Qwen3-14B tests, adaptive length did not beat the fixed 8-token draft. That does not establish the result for other models or workloads.
One guess or a tree of guesses
A chain of draft tokens has one weak point: a single wrong token discards everything after it. A tree draft keeps several alternatives at each position, and the target model checks the whole tree in one pass, with each token seeing only its own branch [6]. The longest branch the target model agrees with is kept. Figure 1 compares the two with a simple example.
SpecInfer introduced tree checking for serving LLMs, and Medusa and EAGLE also check trees [6]. When a pass is dominated by loading weights, checking a larger set of candidates can add little relative to the loading cost. SpecExec applies this to models offloaded to RAM and reports up to 20 accepted tokens per pass [6].
The variants side by side
Table 1 places the variants above by their draft source, the training they need, and the extra memory they use. A survey by Xia et al. compares many more [7].
Table 1. Main speculative decoding variants. Every one keeps the target model's check, so with greedy decoding each returns the target model's own output; Medusa also offers a relaxed acceptance rule that gives up this exactness for speed [3].
| Variant | Draft source | Training needed | Extra memory |
|---|---|---|---|
| Draft model [1] | Separate small model | None | The draft model |
| Draft & Verify [2] | Target model, some layers skipped | None | None |
| LayerSkip [2] | Target model's early layers | Training the model for early exit | None |
| Medusa [3] | Extra prediction heads | The heads only | Small |
| EAGLE [3] | One extra predicting layer | That layer only | Small |
| Prompt lookup [4] | Matching text in the prompt | None | None |
| Lookahead [4] | Target model's own parallel guesses | None | Small |
| SpecExec [6] | Draft model, as a large tree | None | The draft model |
What the tests show
For this streamed Qwen3-14B workload, the separate draft model with a fixed 8-token draft was the best option I tested. Untrained self-speculation had no accepted drafts, and the adaptive policies did not improve on the fixed length.
Tree drafts are a useful next experiment because one slow pass can check several alternatives. I have not measured trees locally; that discussion is literature context, not a laptop result.
References
- Speculative decoding and speculative sampling: Y. Leviathan, M. Kalman, and Y. Matias. 2023. “Fast Inference from Transformers via Speculative Decoding,” ICML 2023; C. Chen et al. 2023. “Accelerating Large Language Model Decoding with Speculative Sampling,” arXiv:2302.01318.
- Self-speculation: J. Zhang et al. 2024. “Draft & Verify: Lossless Large Language Model Acceleration via Self-Speculative Decoding,” ACL 2024; M. Elhoushi et al. 2024. “LayerSkip: Enabling Early Exit Inference and Self-Speculative Decoding,” ACL 2024.
- Extra prediction heads: T. Cai et al. 2024. “Medusa: Simple LLM Inference Acceleration Framework with Multiple Decoding Heads,” ICML 2024; Y. Li, F. Wei, C. Zhang, and H. Zhang. 2024. “EAGLE: Speculative Sampling Requires Rethinking Feature Uncertainty,” ICML 2024.
- No draft model: A. Saxena. 2023. Prompt Lookup Decoding, GitHub; Y. Fu, P. Bailis, I. Stoica, and H. Zhang. 2024. “Break the Sequential Dependency of LLM Inference Using Lookahead Decoding,” ICML 2024.
- Adaptive draft length: K. Huang, X. Guo, and M. Wang. 2024. “SpecDec++: Boosting Speculative Decoding via Adaptive Candidate Lengths,” arXiv:2405.19715; J. Mamou et al. 2024. “Accelerating Speculative Decoding using Dynamic Speculation Length,” arXiv:2405.04304.
- Tree drafts: X. Miao et al. 2024. “SpecInfer: Accelerating Large Language Model Serving with Tree-based Speculative Inference and Verification,” ASPLOS 2024; R. Svirschevski et al. 2024. “SpecExec: Massively Parallel Speculative Decoding for Interactive LLM Inference on Consumer Devices,” NeurIPS 2024.
- H. Xia et al. 2024. “Unlocking Efficiency in Large Language Model Inference: A Comprehensive Survey of Speculative Decoding,” Findings of ACL 2024.
- O. Erge, Afterimage. Self-speculation and adaptive draft-length measurements in
docs/RESULTS_LOG.mdanddocs/ALL_HYPOTHESES_AND_BASELINES.md.