RACER: Retrieval-Augmented Contextual Rapid Speculative Decoding
AI 摘要
RACER通过结合检索和logits驱动的线索,加速LLM的自回归解码过程。
主要贡献
- 提出了一种新的无需训练的快速推测解码方法RACER
- RACER结合了检索的精确模式和logit驱动的未来线索
- 实验证明RACER在推理速度上超过现有方法
方法论
RACER结合检索到的精确匹配和logits驱动的预测,构建更丰富的推测草案,从而加速自回归解码。
原文摘要
Autoregressive decoding in Large Language Models (LLMs) generates one token per step, causing high inference latency. Speculative decoding (SD) mitigates this through a guess-and-verify strategy, but existing training-free variants face trade-offs: retrieval-based drafts break when no exact match exists, while logits-based drafts lack structural guidance. We propose $\textbf{RACER}$ ($\textbf{R}$etrieval-$\textbf{A}$ugmented $\textbf{C}$ont$\textbf{e}$xtual $\textbf{R}$apid Speculative Decoding), a lightweight and training-free method that integrates retrieved exact patterns with logit-driven future cues. This unification supplies both reliable anchors and flexible extrapolation, yielding richer speculative drafts. Experiments on Spec-Bench, HumanEval, and MGSM-ZH demonstrate that RACER consistently accelerates inference, achieving more than $2\times$ speedup over autoregressive decoding, and outperforms prior training-free methods, offering a scalable, plug-and-play solution for efficient LLM decoding. Our source code is available at $\href{https://github.com/hkr04/RACER}{https://github.com/hkr04/RACER}$.