English

RACER: Retrieval-Augmented Contextual Rapid Speculative Decoding

Computation and Language 2026-04-17 v1 Artificial Intelligence

Abstract

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 RACER\textbf{RACER} (R\textbf{R}etrieval-A\textbf{A}ugmented C\textbf{C}onte\textbf{e}xtual R\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×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\href{https://github.com/hkr04/RACER}{https://github.com/hkr04/RACER}.

Keywords

Cite

@article{arxiv.2604.14885,
  title  = {RACER: Retrieval-Augmented Contextual Rapid Speculative Decoding},
  author = {Zihong Zhang and Zuchao Li and Lefei Zhang and Ping Wang and Hai Zhao},
  journal= {arXiv preprint arXiv:2604.14885},
  year   = {2026}
}

Comments

Accepted to Findings of ACL 2026

R2 v1 2026-07-01T12:12:27.343Z