arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2511.01282cs.CLcs.AI
收藏

何时、什么与如何:重新思考检索增强的投机解码

When, What, and How: Rethinking Retrieval-Enhanced Speculative Decoding

OPPO Research Institute(OPPO研究院)

Min Fang, Zhihui Fu, Qibin Zhao, Jun Wang

AI总结:

提出ReSpec框架,通过熵引导自适应触发、反馈驱动候选选择和来源感知宽松验证,将启发式起草器切换转变为自适应决策,在保持输出质量的同时实现最先进加速。

摘要:

投机解码(SD)已成为一种在不损害输出质量的情况下加速大型语言模型(LLM)推理的有效技术。然而,可实现的加速很大程度上取决于起草模型的有效性。虽然像 EAGLE-2 这样基于模型的方法准确但成本高昂,但像 SAM-Decoding 这样的检索增强方法依赖于常常触发不必要检索的启发式切换策略。为了解决这个问题,我们提出了 ReSpec(检索增强的投机解码),这是一个将启发式起草器切换转变为自适应决策的新颖框架。ReSpec 具有三项核心创新:1)熵引导的自适应触发器量化上下文可预测性,仅在不确定性较低时启动检索,避免成本高昂的低质量投机。2)反馈驱动的候选选择利用历史反馈来组织多个高质量候选以进行并行验证,最大化检索效用。3)来源感知的宽松验证策略对模型生成的草案应用严格检查,同时对检索到的草案使用宽松验证,在准确性和效率之间实现更好的平衡。在 Spec-Bench 上的大量实验表明,ReSpec 实现了最先进的加速,分别比 EAGLE-2 和 SAM-Decoding 超出 33% 和 25% 以上,同时保持输出质量。

英文摘要:

Speculative decoding (SD) has emerged as an effective technique to accelerate large language model (LLM) inference without compromising output quality. However, the achievable speedup largely depends on the effectiveness of the drafting model. While model-based methods like EAGLE-2 are accurate but costly, retrieval-enhanced methods like SAM-Decoding rely on heuristic switching strategies that often trigger unnecessary retrievals. To address this, we propose ReSpec (\textbf{Re}trieval-enhanced \textbf{Spe}culative Decoding), a novel framework that transforms heuristic drafter switching into adaptive decision-making. ReSpec features three core innovations: 1) An \textbf{entropy-guided adaptive trigger} quantifies contextual predictability to initiate retrieval only when uncertainty is low, avoiding costly low-quality speculations. 2) A \textbf{feedback-driven candidate selection} leverages historical feedback to organize multiple high-quality candidates for parallel verification, maximizing retrieval utility. 3) A source-aware \textbf{relaxed verification strategy} applies strict checks to model-generated drafts while using a relaxed verification for retrieved drafts, achieving a better balance between accuracy and efficiency. Extensive experiments on Spec-Bench demonstrate that ReSpec achieves state-of-the-art acceleration,outperforming EAGLE-2 and SAM-Decoding by over $33\%$ and $25\%$, respectively, while maintaining output quality.

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

↑