Lune

AAAI2025Top-tier venue

Dynamic-Width Speculative Beam Decoding for LLM Inference

Zongyue Qin, Zifan He, Neha Prakriya, Jason Cong, Yizhou Sun

Abstract

Large language models (LLMs) based on transformer architecture have shown outstanding performance across numerous real-world tasks. However, the autoregressive nature of these models makes the inference process slow and costly. Speculative decoding has emerged as a promising solution, leveraging a smaller auxiliary model to draft future tokens, which are then validated simultaneously by the larger model, achieving a speed-up of 1-2x. Although speculative decoding matches the same distribution as multinomial sampling, multinomial sampling itself is prone to suboptimal outputs, where as beam sampling is widely recognized for producing higher-quality results by maintaining multiple candidate sequences at each step. This paper explores the novel integration of speculative decoding with beam sampling. However, there are four key challenges: (1) how to generate multiple sequences from the larger model's distribution given drafts sequences from the small model; (2) how to dynamically optimize the number of beams to balance efficiency and accuracy; (3) how to efficiently verify the multiple drafts in parallel; and (4) how to address the extra memory costs inherent in beam sampling. To address these challenges, we propose dynamic-width speculative beam decoding (DSBD). Specifically, we first introduce a novel draft and verification scheme that generates multiple sequences following the large model's distribution based on beam sampling trajectories from the small model. Then, we introduce an adaptive mechanism to dynamically tune the number of beams based on the context, optimizing efficiency and effectiveness. Besides, we extend tree-based parallel verification to handle multiple trees simultaneously, accelerating the verification process. Finally, we illustrate a simple modification to our algorithm to mitigate the memory overhead of beam sampling. Experimental results show that our approach achieves a 1.5-1.9x speed-up and1.8-2.5x lower energy consumption compared to beam sampling, with no loss in downstream performance. Moreover, it can produce significantly higher-quality outputs than speculative decoding, while maintaining similar time, memory, and energy costs. In summary, our method offers a more efficient and effective inference process for LLMs.

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.

7 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

  • SpecTr: Fast Speculative Decoding via Optimal Transport cites Fast Inference from Transformers via Speculative Decoding
  • Online Speculative Decoding cites Fast Inference from Transformers via Speculative Decoding
  • STree: Speculative Tree Decoding for Hybrid State Space Models cites Fast Inference from Transformers via Speculative Decoding
  • Speculative Decoding with Big Little Decoder cites Movement Pruning: Adaptive Sparsity by Fine-Tuning
  • Speculative Decoding with Big Little Decoder cites Fast Inference from Transformers via Speculative Decoding
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers7

  1. STree: Speculative Tree Decoding for Hybrid State Space ModelsYangchao Wu, Zongyue Qin, Alex Wong, Stefano SoattoNeurIPS 2025 · 8 citations
  2. Efficient Beam Search for Large Language Models Using Trie-Based DecodingBrian J. Chan, Mao Xun Huang, Jui-Hung Cheng, Chao-Ting Chen et al.EMNLP 2025 · 2 citations
  3. Well Begun, Half Done: Reinforcement Learning with Prefix Optimization for LLM ReasoningYiliu Sun, Zicheng Zhao, Yang Wei, Yanfang Zhang et al.AAAI 2026 · 1 citation
  4. FastTTS: Accelerating Test-Time Scaling for Edge LLM ReasoningHao Mark Chen, Zhiwen Mo, Guanxi Lu, Shuang Liang et al.ASPLOS 2026 · 1 citation
  5. E^2-SCI: Elastic Edge–Cloud Speculative Decoding via Credit InertiaSenyao Li, Haozhao Wang, Zhaobai Jiang, Zhanbo Jin et al.CVPR 2026

Builds on8

  1. Fast Inference from Transformers via Speculative DecodingYaniv Leviathan, Matan Kalman, Yossi MatiasICML 2023 · 1,472 citations
  2. Movement Pruning: Adaptive Sparsity by Fine-TuningVictor Sanh, Thomas Wolf, Alexander M. RushNeurIPS 2020 · 656 citations
  3. Speculative Decoding with Big Little DecoderSehoon Kim, Karttikeya Mangalam, Suhong Moon, Jitendra Malik et al.NeurIPS 2023 · 212 citations
  4. SpecTr: Fast Speculative Decoding via Optimal TransportZiteng Sun, Ananda Theertha Suresh, Jae Hun Ro, Ahmad Beirami et al.NeurIPS 2023 · 164 citations
  5. Online Speculative DecodingXiaoxuan Liu, Lanxiang Hu, Peter Bailis, Alvin Cheung et al.ICML 2024 · 104 citations

Related papers

  1. Optimized Multi-Token Joint Decoding With Auxiliary Model for LLM InferenceZongyue Qin, Ziniu Hu, Zifan He, Neha Prakriya et al.ICLR 2025
  2. A Theoretical Perspective for Speculative Decoding AlgorithmMing Yin, Minshuo Chen, Kaixuan Huang, Mengdi WangNeurIPS 2024 · 36 citations
  3. A Drop-In Solution for On-the-Fly Adaptation of Speculative Decoding in Large Language ModelsJiesong Liu, Brian Park, Xipeng ShenACL 2025 · 2 citations
  4. Unlocking Efficiency in Large Language Model Inference: A Comprehensive Survey of Speculative DecodingHeming Xia, Zhe Yang, Qingxiu Dong, Peiyi Wang et al.ACL Findings 2024 · 49 citations
  5. SpecPIM: Accelerating Speculative Inference on PIM-Enabled System via Architecture-Dataflow Co-ExplorationCong Li, Zhe Zhou, Size Zheng, Jiaxi Zhang et al.ASPLOS 2024 · 29 citations
Dusk over the sea between two cliffs drawn in fine vertical lines