BanditSpec: Adaptive Speculative Decoding via Bandit Algorithms
Yunlong Hou, Fengzhuo Zhang, Cunxiao Du, Xuan Zhang, Jiachun Pan, Tianyu Pang, Chao Du, Vincent Y. F. Tan, Zhuoran Yang
摘要
Speculative decoding has emerged as a popular method to accelerate the inference of Large Language Models (LLMs) while retaining their superior text generation performance. Previous methods either adopt a fixed speculative decoding configuration regardless of the prefix tokens or train draft models in an offline or online manner to align them with the context. This paper proposes a training-free online learning framework to adaptively choose the configuration of the hyperparameters for speculative decoding as text is being generated. We first formulate this hyperparameter selection problem as a Multi-Armed Bandit problem and provide a general speculative decoding framework BANDITSPEC. Furthermore, two bandit-based hyperparameter selection algorithms, UCBSPEC and EXP3SPEC, are designed and analyzed in terms of a novel quantity, the stopping time regret. We upper bound this regret under both stochastic and adversarial reward settings. By deriving an information-theoretic impossibility result, it is shown that the regret performance of UCBSPEC is optimal up to universal constants. Finally, extensive empirical experiments with LLaMA3 and Qwen2 demonstrate that our algorithms are effective compared to existing methods, and the throughput is close to the oracle best hyperparameter in simulated real-life LLM serving scenarios with diverse input prompts.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 5 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- When Drafts Evolve: Speculative Decoding Meets Online Learning 引用了 DistillSpec: Improving Speculative Decoding via Knowledge Distillation
- When Drafts Evolve: Speculative Decoding Meets Online Learning 引用了 Not-a-Bandit: Provably No-Regret Drafter Selection in Speculative Decoding for LLMs
- When Drafts Evolve: Speculative Decoding Meets Online Learning 引用了 Online Speculative Decoding
- When Drafts Evolve: Speculative Decoding Meets Online Learning 引用了 Language Models are Few-Shot Learners
- When Drafts Evolve: Speculative Decoding Meets Online Learning 引用了 Fast Inference from Transformers via Speculative Decoding
- MineDraft: A Framework for Batch Parallel Speculative Decoding 引用了 Fast Inference from Transformers via Speculative Decoding
- DistillSpec: Improving Speculative Decoding via Knowledge Distillation 引用了 Online Speculative Decoding
- Online Speculative Decoding 引用了 DistillSpec: Improving Speculative Decoding via Knowledge Distillation
- DistillSpec: Improving Speculative Decoding via Knowledge Distillation 引用了 Fast Inference from Transformers via Speculative Decoding
- Annealed Relaxation of Speculative Decoding for Faster Autoregressive Image Generation 引用了 GliDe with a CaPE: A Low-Hassle Method to Accelerate Speculative Decoding
- Annealed Relaxation of Speculative Decoding for Faster Autoregressive Image Generation 引用了 Fast Inference from Transformers via Speculative Decoding
- GliDe with a CaPE: A Low-Hassle Method to Accelerate Speculative Decoding 引用了 DistillSpec: Improving Speculative Decoding via Knowledge Distillation
- GliDe with a CaPE: A Low-Hassle Method to Accelerate Speculative Decoding 引用了 Online Speculative Decoding
- GliDe with a CaPE: A Low-Hassle Method to Accelerate Speculative Decoding 引用了 Fast Inference from Transformers via Speculative Decoding
- Re-SpS: A Reinforcement Learning Approach to Speculative Sampling 引用了 Fast Inference from Transformers via Speculative Decoding
- Not-a-Bandit: Provably No-Regret Drafter Selection in Speculative Decoding for LLMs 引用了 GliDe with a CaPE: A Low-Hassle Method to Accelerate Speculative Decoding
- Not-a-Bandit: Provably No-Regret Drafter Selection in Speculative Decoding for LLMs 引用了 Online Speculative Decoding
- Not-a-Bandit: Provably No-Regret Drafter Selection in Speculative Decoding for LLMs 引用了 Fast Inference from Transformers via Speculative Decoding
- Online Speculative Decoding 引用了 Fast Inference from Transformers via Speculative Decoding
- Fast Inference from Transformers via Speculative Decoding 引用了 Language Models are Few-Shot Learners
引用它的顶会 Paper5
- Not-a-Bandit: Provably No-Regret Drafter Selection in Speculative Decoding for LLMsHongyi Liu, Jiaji Huang, Zhen Jia, Youngsuk Park 等ICLR 2026 · 5 次引用
- When Drafts Evolve: Speculative Decoding Meets Online LearningYu-Yang Qian, Hao-Cong Wu, Yichao Fu, Hao Zhang 等ICML 2026 · 2 次引用
- MineDraft: A Framework for Batch Parallel Speculative DecodingZhenwei Tang, Arun Verma, Zijian Zhou, Zhaoxuan Wu 等ICML 2026
- Annealed Relaxation of Speculative Decoding for Faster Autoregressive Image GenerationXingyao Li, Fengzhuo Zhang, Cunxiao Du, Hui JiAAAI 2026
- Re-SpS: A Reinforcement Learning Approach to Speculative SamplingChenan Wang, Daniel H. Shi, Haipeng ChenAAAI 2026
它引用的 Paper15
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- Fast Inference from Transformers via Speculative DecodingYaniv Leviathan, Matan Kalman, Yossi MatiasICML 2023 · 1,472 次引用
- DistillSpec: Improving Speculative Decoding via Knowledge DistillationYongchao Zhou, Kaifeng Lyu, Ankit Singh Rawat, Aditya Krishna Menon 等ICLR 2024 · 143 次引用
- Online Speculative DecodingXiaoxuan Liu, Lanxiang Hu, Peter Bailis, Alvin Cheung 等ICML 2024 · 104 次引用
- GliDe with a CaPE: A Low-Hassle Method to Accelerate Speculative DecodingCunxiao Du, Jing Jiang, Yuanchen Xu, Jiawei Wu 等ICML 2024 · 72 次引用
相关 Paper
- KnapSpec: Self-Speculative Decoding via Adaptive Layer Selection as a Knapsack ProblemSeongjin Cha, Gyuwan Kim, Dongsu Han, Tao Yang 等ICML 2026
- A Drop-In Solution for On-the-Fly Adaptation of Speculative Decoding in Large Language ModelsJiesong Liu, Brian Park, Xipeng ShenACL 2025 · 2 次引用
- MagicDec: Breaking the Latency-Throughput Tradeoff for Long Context Generation with Speculative DecodingRanajoy Sadhukhan, Jian Chen, Zhuoming Chen, Vashisth Tiwari 等ICLR 2025
- Efficient Training-Free Multi-Token Prediction via Embedding-Space ProbingRaghavv Goel, Mukul Gagrani, Mingu Lee, Christopher LottICML 2026
- UniSpec: Training-Free Speculative Decoding for Robust LLM Acceleration Across Languages and HardwareTruong Dinh Do, Nguyen-Khang Le, Le-Minh NguyenACL 2026
