Large language models (LLMs) 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, whereas 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...
Nightjar: Dynamic Adaptive Speculative Decoding for Large Language Models Serving
State Key Laboratory of Complex & Critical Software Environment, National Key Laboratory of Parallel and Distributed Computing, College of Computer Science and Technology, National University of Defense Technology(复杂与关键软件环境国家重点实验室、平行与分布式计算国家实验室、计算机科学与技术学院、国防科技大学)
School of Artificial Intelligence, Wuhan University(武汉大学人工智能学院);School of Computer Science, Wuhan University(武汉大学计算机学院);School of Information Management, Wuhan University(武汉大学信息管理学院);School of Computer Science, Shanghai Jiao Tong University(上海交通大学计算机学院)
TETRIS: Optimal Draft Token Selection for Batch Speculative Decoding
Singapore-MIT Alliance for Research and Technology(新加坡-麻省理工联合研究技术联盟);Dept. of Computer Science, National University of Singapore(新加坡国立大学计算机科学系);CSAIL, Massachusetts Institute of Technology(麻省理工学院计算机科学与人工智能实验室)
SimSD: Simple Speculative Decoding in Diffusion Language Models
University of California San Diego(加州大学圣地亚哥分校);University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校);Google(谷歌);University of California Santa Barbara(加州大学圣芭芭拉分校)
Speculative Decoding Reimagined for Multimodal Large Language Models
Key Laboratory of Multimedia Trusted Perception and Efficient Computing, Ministry of Education of China, Xiamen University(多媒体可信感知与高效计算重点实验室、中华人民共和国教育部、厦门大学)
PACER: Blockwise Pre-verification for Speculative Decoding with Adaptive Length
X-LANCE Lab, School of Computer Science MoE Key Lab of Artificial Intelligence, SJTU AI Institute Shanghai Jiao Tong University(X-LANCE实验室,计算机科学学院,人工智能关键实验室,上海交通大学人工智能研究院)
State Key Laboratory of AI Safety, Institute of Computing Technology, CAS(人工智能安全国家重点实验室,计算技术研究所,中国科学院);School of Computer Science & Technology, Beijing Institute of Technology(计算机科学与技术学院,北京理工大学)
Jakiro: Boosting Speculative Decoding with Decoupled Multi-Head via MoE
Advanced Micro Devices, Inc.(超威半导体公司);Institute of Artificial Intelligence and Robotics, Xi'an Jiaotong University(西安交通大学人工智能与机器人研究所);University of HongKong(香港大学)
Cactus: Accelerating Auto-Regressive Decoding with Constrained Acceptance Speculative Sampling
Dept. Computing Science & Alberta Machine Intelligence Institute (Amii), University of Alberta(阿尔伯塔大学计算机科学系与阿尔伯塔机器智能研究所);Canada CIFAR AI Chair(加拿大CIFAR人工智能讲席)