DistillSpec: Improving Speculative Decoding via Knowledge Distillation
Yongchao Zhou, Kaifeng Lyu, Ankit Singh Rawat, Aditya Krishna Menon, Afshin Rostamizadeh, Sanjiv Kumar, Jean-François Kagy, Rishabh Agarwal
Abstract
Speculative decoding (SD) accelerates large language model inference by employing a faster draft model for generating multiple tokens, which are then verified in parallel by the larger target model, resulting in the text generated according to the target model distribution. However, identifying a compact draft model that is well-aligned with the target model is challenging. To tackle this issue, we propose DistillSpec, a method that uses knowledge distillation to better align the draft model with the target model before applying SD. DistillSpec makes two key design choices, which we demonstrate via systematic study to be crucial to improving the draft and target alignment: utilizing on-policy data generation from the draft model, and tailoring the divergence function to the task and decoding strategy. Notably, DistillSpec yields 10 -45% speedups over standard SD on a range of benchmarks, using both greedy and non-greedy sampling. We show that the distilled model can be well transferred to various tasks with an average speedup of 26%. Furthermore, we combine DistillSpec with lossy SD to achieve fine-grained control over the latency vs. task performance trade-off. Finally, in practical scenarios with models of varying sizes, first using distillation to boost the performance of the target model and then applying DistillSpec to train a well-aligned draft model can reduce decoding latency by 6 -10× with minimal performance drop, compared to standard decoding without distillation.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
76 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Cascade Speculative Drafting for Even Faster LLM Inference cites Fast Inference from Transformers via Speculative Decoding
- Cascade Speculative Drafting for Even Faster LLM Inference cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Large Language Models as Tool Makers cites Fast Inference from Transformers via Speculative Decoding
- Large Language Models as Tool Makers cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Online Speculative Decoding cites Cascade Speculative Drafting for Even Faster LLM Inference
- Online Speculative Decoding cites Fast Inference from Transformers via Speculative Decoding
- EAGLE: Speculative Sampling Requires Rethinking Feature Uncertainty cites Cascade Speculative Drafting for Even Faster LLM Inference
- EAGLE: Speculative Sampling Requires Rethinking Feature Uncertainty cites Online Speculative Decoding
- EAGLE: Speculative Sampling Requires Rethinking Feature Uncertainty cites Fast Inference from Transformers via Speculative Decoding
- On-Policy Distillation of Language Models: Learning from Self-Generated Mistakes cites Online Speculative Decoding
- On-Policy Distillation of Language Models: Learning from Self-Generated Mistakes cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Specializing Smaller Language Models towards Multi-Step Reasoning cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Chain-of-Thought Reasoning Without Prompting cites Fast Inference from Transformers via Speculative Decoding
- Chain-of-Thought Reasoning Without Prompting cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
Cited by top-tier papers76
- EAGLE: Speculative Sampling Requires Rethinking Feature UncertaintyYuhui Li, Fangyun Wei, Chao Zhang, Hongyang ZhangICML 2024 · 424 citations
- On-Policy Distillation of Language Models: Learning from Self-Generated MistakesRishabh Agarwal, Nino Vieillard, Yongchao Zhou, Piotr Stanczyk et al.ICLR 2024 · 311 citations
- Chain-of-Thought Reasoning Without PromptingXuezhi Wang, Denny ZhouNeurIPS 2024 · 305 citations
- Cascade Speculative Drafting for Even Faster LLM InferenceZiyi Chen, Xiaocong Yang, Jiacheng Lin, Chenkai Sun et al.NeurIPS 2024 · 107 citations
- Online Speculative DecodingXiaoxuan Liu, Lanxiang Hu, Peter Bailis, Alvin Cheung et al.ICML 2024 · 104 citations
Builds on11
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
- Fast Inference from Transformers via Speculative DecodingYaniv Leviathan, Matan Kalman, Yossi MatiasICML 2023 · 1,472 citations
- Specializing Smaller Language Models towards Multi-Step ReasoningYao Fu, Hao Peng, Litu Ou, Ashish Sabharwal et al.ICML 2023 · 347 citations
- On-Policy Distillation of Language Models: Learning from Self-Generated MistakesRishabh Agarwal, Nino Vieillard, Yongchao Zhou, Piotr Stanczyk et al.ICLR 2024 · 311 citations
- Large Language Models as Tool MakersTianle Cai, Xuezhi Wang, Tengyu Ma, Xinyun Chen et al.ICLR 2024 · 283 citations
Related papers
- AdaSPEC: Selective Knowledge Distillation for Efficient Speculative DecodersYuezhou Hu, Jiaxin Guo, Xinyu Feng, Tuo ZhaoNeurIPS 2025 · 9 citations
- Temperature-Centric Investigation of Speculative Decoding with Knowledge DistillationSiru Ouyang, Shuohang Wang, Minhao Jiang, Ming Zhong et al.EMNLP Findings 2024 · 1 citation
- Accelerating LLM Inference with Lossless Speculative Decoding Algorithms for Heterogeneous VocabulariesNadav Timor, Jonathan Mamou, Daniel Korat, Moshe Berchansky et al.ICML 2025
- Faster Speculative Decoding via Effective Draft Decoder with Pruned Candidate TreeHuanran Zheng, Xiaoling WangACL 2025 · 6 citations
- EDSD: Entropy-Driven Design for Faster Speculative DecodingLongkai Cheng, Ximing Wang, Jiangcai Zhu, Kailai Shao et al.ACL 2026
