Lune

ICML2025Top-tier venue

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

Abstract

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.

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.

5 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • When Drafts Evolve: Speculative Decoding Meets Online Learning cites DistillSpec: Improving Speculative Decoding via Knowledge Distillation
  • When Drafts Evolve: Speculative Decoding Meets Online Learning cites Not-a-Bandit: Provably No-Regret Drafter Selection in Speculative Decoding for LLMs
  • When Drafts Evolve: Speculative Decoding Meets Online Learning cites Online Speculative Decoding
  • When Drafts Evolve: Speculative Decoding Meets Online Learning cites Language Models are Few-Shot Learners
  • When Drafts Evolve: Speculative Decoding Meets Online Learning cites Fast Inference from Transformers via Speculative Decoding
  • MineDraft: A Framework for Batch Parallel Speculative Decoding cites Fast Inference from Transformers via Speculative Decoding
  • DistillSpec: Improving Speculative Decoding via Knowledge Distillation cites Online Speculative Decoding
  • Online Speculative Decoding cites DistillSpec: Improving Speculative Decoding via Knowledge Distillation
  • DistillSpec: Improving Speculative Decoding via Knowledge Distillation cites Fast Inference from Transformers via Speculative Decoding
  • Annealed Relaxation of Speculative Decoding for Faster Autoregressive Image Generation cites GliDe with a CaPE: A Low-Hassle Method to Accelerate Speculative Decoding
  • Annealed Relaxation of Speculative Decoding for Faster Autoregressive Image Generation cites Fast Inference from Transformers via Speculative Decoding
  • GliDe with a CaPE: A Low-Hassle Method to Accelerate Speculative Decoding cites DistillSpec: Improving Speculative Decoding via Knowledge Distillation
  • GliDe with a CaPE: A Low-Hassle Method to Accelerate Speculative Decoding cites Online Speculative Decoding
  • GliDe with a CaPE: A Low-Hassle Method to Accelerate Speculative Decoding cites Fast Inference from Transformers via Speculative Decoding
  • Re-SpS: A Reinforcement Learning Approach to Speculative Sampling cites Fast Inference from Transformers via Speculative Decoding
  • Not-a-Bandit: Provably No-Regret Drafter Selection in Speculative Decoding for LLMs cites 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 cites Online Speculative Decoding
  • Not-a-Bandit: Provably No-Regret Drafter Selection in Speculative Decoding for LLMs cites Fast Inference from Transformers via Speculative Decoding
  • Online Speculative Decoding cites Fast Inference from Transformers via Speculative Decoding
  • Fast Inference from Transformers via Speculative Decoding cites Language Models are Few-Shot Learners
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers5

  1. Not-a-Bandit: Provably No-Regret Drafter Selection in Speculative Decoding for LLMsHongyi Liu, Jiaji Huang, Zhen Jia, Youngsuk Park et al.ICLR 2026 · 5 citations
  2. When Drafts Evolve: Speculative Decoding Meets Online LearningYu-Yang Qian, Hao-Cong Wu, Yichao Fu, Hao Zhang et al.ICML 2026 · 2 citations
  3. MineDraft: A Framework for Batch Parallel Speculative DecodingZhenwei Tang, Arun Verma, Zijian Zhou, Zhaoxuan Wu et al.ICML 2026
  4. Annealed Relaxation of Speculative Decoding for Faster Autoregressive Image GenerationXingyao Li, Fengzhuo Zhang, Cunxiao Du, Hui JiAAAI 2026
  5. Re-SpS: A Reinforcement Learning Approach to Speculative SamplingChenan Wang, Daniel H. Shi, Haipeng ChenAAAI 2026

Builds on15

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Fast Inference from Transformers via Speculative DecodingYaniv Leviathan, Matan Kalman, Yossi MatiasICML 2023 · 1,472 citations
  3. DistillSpec: Improving Speculative Decoding via Knowledge DistillationYongchao Zhou, Kaifeng Lyu, Ankit Singh Rawat, Aditya Krishna Menon et al.ICLR 2024 · 143 citations
  4. Online Speculative DecodingXiaoxuan Liu, Lanxiang Hu, Peter Bailis, Alvin Cheung et al.ICML 2024 · 104 citations
  5. GliDe with a CaPE: A Low-Hassle Method to Accelerate Speculative DecodingCunxiao Du, Jing Jiang, Yuanchen Xu, Jiawei Wu et al.ICML 2024 · 72 citations

Related papers

  1. KnapSpec: Self-Speculative Decoding via Adaptive Layer Selection as a Knapsack ProblemSeongjin Cha, Gyuwan Kim, Dongsu Han, Tao Yang et al.ICML 2026
  2. A Drop-In Solution for On-the-Fly Adaptation of Speculative Decoding in Large Language ModelsJiesong Liu, Brian Park, Xipeng ShenACL 2025 · 2 citations
  3. MagicDec: Breaking the Latency-Throughput Tradeoff for Long Context Generation with Speculative DecodingRanajoy Sadhukhan, Jian Chen, Zhuoming Chen, Vashisth Tiwari et al.ICLR 2025
  4. Efficient Training-Free Multi-Token Prediction via Embedding-Space ProbingRaghavv Goel, Mukul Gagrani, Mingu Lee, Christopher LottICML 2026
  5. UniSpec: Training-Free Speculative Decoding for Robust LLM Acceleration Across Languages and HardwareTruong Dinh Do, Nguyen-Khang Le, Le-Minh NguyenACL 2026
Dusk over the sea between two cliffs drawn in fine vertical lines