顾问解码:又一种协同机制
Consultant Decoding: Yet Another Synergistic Mechanism
AI总结:
本文提出顾问解码(CD),仅用LLM的token级似然验证草稿,以参数规模相差两个数量级的模型组合实现高达2.5倍推理加速,并将大模型调用频率降至10%以下,性能甚至超过推测解码理论上限。
摘要:
基于推测解码(Speculative Decoding, SD)的协同机制作为一种简单而有效的加速大语言模型(LLMs)推理的方法,已获得广泛关注。然而,较高的拒绝率需要反复调用LLMs来验证草稿token,削弱了SD的整体效率收益。在本文中,我们重新审视现有验证机制,并提出一种新颖的协同机制——顾问解码(Consultant Decoding, CD)。与依赖重要性采样导出指标进行验证的SD不同,CD仅利用LLM计算的token级似然来验证候选草稿。与目标模型相比,CD实现了高达2.5倍的推理速度提升,同时保持相当的生成质量(约为目标模型性能的100%)。有趣的是,这一效果是通过组合参数规模相差两个数量级的模型实现的。此外,CD将大型目标模型的调用频率降低至10%以下,尤其是在要求更高的任务中。CD的性能甚至被发现超越了大型目标模型,而后者在理论上代表推测解码的上限。
英文摘要:
The synergistic mechanism based on Speculative Decoding (SD) has garnered considerable attention as a simple yet effective approach for accelerating the inference of large language models (LLMs). Nonetheless, the high rejection rates require repeated LLMs calls to validate draft tokens, undermining the overall efficiency gain of SD. In this work, we revisit existing verification mechanisms and propose a novel synergetic mechanism Consultant Decoding (CD). Unlike SD, which relies on a metric derived from importance sampling for verification, CD verifies candidate drafts using token-level likelihoods computed solely by the LLM. CD achieves up to a 2.5-fold increase in inference speed compared to the target model, while maintaining comparable generation quality (around 100% of the target model's performance). Interestingly, this is achieved by combining models whose parameter sizes differ by two orders of magnitude. In addition, CD reduces the call frequency of the large target model to below 10%, particularly in more demanding tasks. CD's performance was even found to surpass that of the large target model, which theoretically represents the upper bound for speculative decoding.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。