arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.26527cs.LG
收藏

多元推测解码的理论研究

Polybasic Speculative Decoding Through a Theoretical Perspective

Key Laboratory of Multimedia Trusted Perception(多媒体可信感知关键实验室);Efficient Computing, Ministry of Education of China, Xiamen University(高效计算、教育部中国 ministry of education、厦门大学);Institute of Artificial Intelligence, Xiamen University(人工智能研究院、厦门大学);Peng Cheng Laboratory, Shenzhen, China(鹏城实验室、深圳中国)

Ruilin Wang, Huixia Li, Yuexiao Ma, Xiawu Zheng, Fei Chao, Xuefeng Xiao, Rongrong Ji

摘要:

推理延迟是大语言模型大规模部署的关键瓶颈。推测解码方法最近已经显示出在不损害输出分布的情况下加速推理的前景。然而,现有的工作通常依赖于一个二元的起草-验证框架,缺乏严格的理论基础。在本文中,我们介绍了一种新的\emph{polybasic}推测解码框架,支持一个全面的理论分析。具体来说,我们证明了一个基本定理,多模型推测解码系统的最佳推理时间的特点,揭示了如何扩展超越二元的方法,更一般的多元范式。通过我们对多模型令牌生成的理论研究,我们揭示并优化了模型功能,接受长度和整体计算成本之间的相互作用。我们的框架既支持独立实现,也支持与现有推测技术的集成,从而在实践中提高性能。多个模型系列的实验结果表明,我们的方法产生的加速比范围从$3.31\times$到$4.01\times$(LLaMA 2-Chat 7 B),最高可达$3.87 \times$(LLaMA 3 - 8 B),最高可达$4.43 \times$(Vicuna-7 B),最高可达$3.85 \times$(Qwen 2 - 7 B)--所有这些都保持了原始的输出分布。我们公布了我们的理论证明和实现代码,以方便进一步研究多元推测解码。

英文摘要:

Inference latency stands as a critical bottleneck in the large-scale deployment of Large Language Models (LLMs). Speculative decoding methods have recently shown promise in accelerating inference without compromising the output distribution. However, existing work typically relies on a dualistic draft-verify framework and lacks rigorous theoretical grounding. In this paper, we introduce a novel \emph{polybasic} speculative decoding framework, underpinned by a comprehensive theoretical analysis. Specifically, we prove a fundamental theorem that characterizes the optimal inference time for multi-model speculative decoding systems, shedding light on how to extend beyond the dualistic approach to a more general polybasic paradigm. Through our theoretical investigation of multi-model token generation, we expose and optimize the interplay between model capabilities, acceptance lengths, and overall computational cost. Our framework supports both standalone implementation and integration with existing speculative techniques, leading to accelerated performance in practice. Experimental results across multiple model families demonstrate that our approach yields speedup ratios ranging from $3.31\times$ to $4.01\times$ for LLaMA2-Chat 7B, up to $3.87 \times$ for LLaMA3-8B, up to $4.43 \times$ for Vicuna-7B and up to $3.85 \times$ for Qwen2-7B -- all while preserving the original output distribution. We release our theoretical proofs and implementation code to facilitate further investigation into polybasic speculative decoding.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑