TriSpec: 通过轻量级代理验证实现三元推测解码
TriSpec: Ternary Speculative Decoding via Lightweight Proxy Verification
AI总结:
TriSpec通过引入轻量级代理验证机制,有效降低推测解码的验证成本,实现高达35%的加速并减少50%的目标模型调用次数。
摘要:
大型语言模型(LLMs)的推理效率从根本上受到其串行、自回归生成的限制,尤其是在推理成为关键能力且响应序列变长时。推测解码(SD)提供了一种强大的解决方案,通过其轻量级草稿和并行验证机制提供显著的加速。尽管现有工作已几乎饱和了草稿有效性和效率的改进,本文从一个新的但关键的角度推进SD:验证成本。我们提出了TriSpec,一种新的三元SD框架,其核心引入了轻量级代理,通过批准易于验证的草稿序列并在遇到不确定的token时才调用完整的目标模型,显著降低计算成本。TriSpec可以与最先进的SD方法如EAGLE-3结合,进一步降低验证成本,实现更大的加速。在Qwen3和DeepSeek-R1-Distill-Qwen/LLaMA系列上的广泛实验表明,TriSpec在标准SD上实现了高达35%的加速,同时在保持可比准确性的情况下,目标模型调用次数减少高达50%。
英文摘要:
Inference efficiency in Large Language Models (LLMs) is fundamentally limited by their serial, autoregressive generation, especially as reasoning becomes a key capability and response sequences grow longer. Speculative decoding (SD) offers a powerful solution, providing significant speed-ups through its lightweight drafting and parallel verification mechanism. While existing work has nearly saturated improvements in draft effectiveness and efficiency, this paper advances SD from a new yet critical perspective: the verification cost. We propose TriSpec, a novel ternary SD framework that, at its core, introduces a lightweight proxy to significantly reduce computational cost by approving easily verifiable draft sequences and engaging the full target model only when encountering uncertain tokens. TriSpec can be integrated with state-of-the-art SD methods like EAGLE-3 to further reduce verification costs, achieving greater acceleration. Extensive experiments on the Qwen3 and DeepSeek-R1-Distill-Qwen/LLaMA families show that TriSpec achieves up to 35% speedup over standard SD, with up to 50% fewer target model invocations while maintaining comparable accuracy.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。