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

3模型投机解码

3-Model Speculative Decoding

LG Electronics USA(LG电子美国公司)

Sanghyun Byun, Mohanad Odema, Jung Ick Guack, Baisub Lee, Jacob Song, Woo Seong Chung

AI总结:

本文提出金字塔投机解码(PyramidSD),通过在草稿模型与目标模型间插入中间限定模型,弥合分布差距,提升接受率与吞吐量,实验显示速度提升达1.91倍。

摘要:

投机解码(SD)通过使用较小的草稿模型提出令牌,再由较大的目标模型进行验证,从而加速大型语言模型的推理。然而,SD的吞吐量增益从根本上受到草稿模型大小与令牌接受率之间权衡的限制:较小的草稿模型生成令牌更快,但与目标模型的输出分布差异更大,导致接受率较低,加速效果减弱。我们引入了金字塔投机解码(PyramidSD),这是SD的一种扩展,它在草稿模型和目标模型之间插入一个中间限定模型,以弥合输出预测中的分布差距,从而允许使用更小的模型进行草稿生成。这种分层解码策略改善了模型间的对齐,使得接受率更高,并允许使用显著更小的草稿模型而不牺牲整体性能。PyramidSD基于模糊接受标准,支持在每个阶段放宽发散阈值,从而提高吞吐量。在实验中,PyramidSD相比标准SD实现了高达1.91倍的生成速度提升,在消费级GPU(RTX 4090)上达到每秒124个令牌。在具有1B参数草稿模型和8B目标模型的小内存设置中,PyramidSD以最小的目标模型质量损失换取吞吐量的提升。总体而言,PyramidSD提供了一种增强投机解码效率的实用方法,并且可以轻松应用于现有的推理流水线。

英文摘要:

Speculative Decoding (SD) accelerates inference in large language models by using a smaller draft model to propose tokens, which are then verified by a larger target model. However, the throughput gains of SD are fundamentally limited by a trade-off between draft model size and token acceptance: smaller draft models generate tokens more quickly but exhibit greater divergence from the target model, resulting in lower acceptance rates and reduced speedups. We introduce Pyramid Speculative Decoding (PyramidSD), an extension of SD that inserts an intermediate qualifier model between the draft and target to bridge the distributional gap in output predictions, allowing smaller model to be used for drafting. This hierarchical decoding strategy improves alignment across models, enabling higher acceptance rates and allowing the use of significantly smaller draft models without sacrificing overall performance. PyramidSD builds on fuzzy acceptance criteria to support relaxed divergence thresholds at each stage, improving throughput. In experiments, PyramidSD achieves up to 1.91x generation speed over standard SD, reaching 124 tokens per second on a consumer GPU (RTX 4090). In small-memory settings with a 1B-parameter draft model and an 8B target model, PyramidSD minimally trades target model quality for improved throughput. Overall, PyramidSD offers a practical approach to enhancing speculative decoding efficiency and can be readily applied to existing inference pipelines.

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

↑