RAPID: Long-Context Inference with Retrieval-Augmented Speculative Decoding
On the map: Retrieval-augmented generation → Generation and context integration
also in 1 more
Abstract (arXiv)
The emergence of long-context large language models (LLMs) offers a promising alternative to traditional retrieval-augmented generation (RAG) for processing extensive documents. However, the computational overhead of long-context inference presents significant efficiency challenges. While Speculative Decoding (SD) traditionally accelerates inference using smaller draft models, its effectiveness diminishes substantially in long-context scenarios due to memory-bound KV cache operations. We introduce Retrieval-Augmented Speculative Decoding (RAPID), which leverages RAG for both accelerating and enhancing generation quality in long-context inference. RAPID introduces the RAG drafter-a draft LLM operating on shortened retrieval contexts-to speculate on the generation of long-context target LLMs. Our approach enables a new paradigm where same-scale or even larger LLMs can serve as RAG drafters while maintaining computational efficiency. To fully leverage the potentially superior capabilities from stronger RAG drafters, we develop an inference-time knowledge transfer that enriches the target distribution by RAG. Extensive experiments on the LLaMA-3.1 and Qwen2.5 backbones demonstrate that RAPID effectively integrates the strengths of both RAG and long-context LLMs, achieving significant performance improvements (e.g., from 39.33 to 42.83 on InfiniteBench for LLaMA-3.1-8B) with more than 2x speedups for long-context inference. Our analyses also reveal the robustness of RAPID across various context lengths and retrieval quality.
Key facts. Cited by 14 papers in the map (data through 14 Oct 2026). Placed in Generation and context integration, one of 15 directions in Retrieval-augmented generation. Builds on 34 of its 36 references that are in the map. First posted on arXiv 27 Feb 2025.
Builds on
34 of 36 references.
Closest ancestors · 1
Same direction, newest first
Other references · 33
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2015Distilling the Knowledge in a Neural Networkcited by 10,324
- 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,626
- 2024Qwen2.5 Technical Reportcited by 4,942
- 2024Gemini 1.5: Unlocking multimodal understanding across millions of tokens of contextcited by 3,224
- 2023Retrieval-Augmented Generation for Large Language Models: A Surveycited by 2,212
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,186
- 2022Fast Inference from Transformers via Speculative Decodingcited by 1,653
- 2023GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpointscited by 1,346
- 2024M3-Embedding: Multi-Linguality, Multi-Functionality, Multi-Granularity Text Embeddings Through Self-Knowledge Distillationcited by 1,073
- 2023Accelerating Large Language Model Decoding with Speculative Samplingcited by 1,006
- 2023H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Modelscited by 832
21 more
- 2024KIVI: A Tuning-Free Asymmetric 2bit Quantization for KV Cachecited by 637
- 2022Contrastive Decoding: Open-ended Text Generation as Optimizationcited by 609
- 2023FlexGen: High-Throughput Generative Inference of Large Language Models with a Single GPUcited by 575
- 2022Efficiently Scaling Transformer Inferencecited by 539
- 2024MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attentioncited by 383
- 2024LongBench v2: Towards Deeper Understanding and Reasoning on Realistic Long-context Multitaskscited by 379
- 2024∞Bench: Extending Long Context Evaluation Beyond 100K Tokenscited by 367
- 2023Adapting Language Models to Compress Contextscited by 356
- 2024LLMLingua-2: Data Distillation for Efficient and Faithful Task-Agnostic Prompt Compressioncited by 348
- 2024MT-Bench-101: A Fine-Grained Benchmark for Evaluating Large Language Models in Multi-Turn Dialoguescited by 250
- 2024World Model on Million-Length Video And Language With Blockwise RingAttentioncited by 198
- 2024GEAR: An Efficient KV Cache Compression Recipe for Near-Lossless Generative Inference of LLMcited by 158
- 2023REST: Retrieval-Based Speculative Decodingcited by 150
- 2024Retrieval Augmented Generation or Long-Context LLMs? A Comprehensive Study and Hybrid Approachcited by 119
- 2024TriForce: Lossless Acceleration of Long Sequence Generation with Hierarchical Speculative Decodingcited by 102
- 2024ZipCache: Accurate and Efficient KV Cache Quantization with Salient Token Identificationcited by 93
- 2024MagicDec: Breaking the Latency-Throughput Tradeoff for Long Context Generation with Speculative Decodingcited by 91
- 2024Speculative RAG: Enhancing Retrieval Augmented Generation through Draftingcited by 77
- 2024Long Context vs. RAG for LLMs: An Evaluation and Revisitscited by 26
- 2024Ouroboros: Generating Longer Drafts Phrase by Phrase for Faster Speculative Decodingcited by 25
- 2024More Tokens, Lower Precision: Towards the Optimal Token-Precision Trade-off in KV Cache Compressioncited by 10
Built on by
Citing papers per year: 2025: 5; 2026: 9.
14 papers.
Sort:
By area:
- 2025ContextPilot: Fast Long-Context Inference via Context Reusecited by 8
- 2026Vegas: Self-Speculative Decoding with Verification-Guided Sparse Attentioncited by 7
- 2026Draft Less, Retrieve More: Hybrid Tree Construction for Speculative Decodingcited by 6
- 2025Scaling Test-Time Inference with Policy-Optimized, Dynamic Retrieval-Augmented Generation via KV Caching and Decodingcited by 5
- 2025Accelerating Mobile Language Model via Speculative Decoding and NPU-Coordinated Executioncited by 5
- 2026The Y-Combinator for LLMs: Solving Long-Context Rot with λ-Calculuscited by 3
- 2025PromptDistill: Query-based Selective Token Retention in Intermediate Layers for Efficient Large Language Model Inferencecited by 1
- 2026A Sparse Glimpse of the Whole: Train-Free Self-Speculative Decodingcited by 1
- 2026AsymSpec: Context-Asymmetric Speculative Decoding for Agentic LLMscited by 1
- 2026ASPIRE: Asynchronous Batched Self-Speculative Decoding for Long-Context LLM Inferencecited by 1
- 2025ODIA: Oriented Distillation for Inline Acceleration of LLM-based Function Callingcited by 0
- 2026KAP: Bridging the Knowledge Selection-Runtime Consumption Gap in LLM Systemscited by 0
- 2026Trajectory-Retrieval Speculative Decoding: When Does a Model's Own History Help?5 Oct 2026
- 2026ASPIRE: Asynchronous Batched Self-Speculative Decoding for Long-Context LLM Inference16 Sep 2026
- 2026Strong Drafts Need Compact Memories: Long-Context Speculative Decoding with Compressed KV Cache31 Aug 2026
- 2026AsymSpec: Context-Asymmetric Speculative Decoding for Agentic LLMs26 Aug 2026
- 2026A Sparse Glimpse of the Whole: Train-Free Self-Speculative Decoding30 Jul 2026
- 2026KAP: Bridging the Knowledge Selection-Runtime Consumption Gap in LLM Systems27 Jul 2026
- 2026Draft Less, Retrieve More: Hybrid Tree Construction for Speculative Decoding19 May 2026
- 2026The Y-Combinator for LLMs: Solving Long-Context Rot with λ-Calculus20 Mar 2026
- 2026Vegas: Self-Speculative Decoding with Verification-Guided Sparse Attention6 Feb 2026
- 2025ContextPilot: Fast Long-Context Inference via Context Reuse5 Nov 2025
- 2025Accelerating Mobile Language Model via Speculative Decoding and NPU-Coordinated Execution17 Oct 2025
- 2025ODIA: Oriented Distillation for Inline Acceleration of LLM-based Function Calling10 Jul 2025
- 2025ContextPilot: Fast Long-Context Inference via Context Reusecited by 8
- 2026Vegas: Self-Speculative Decoding with Verification-Guided Sparse Attentioncited by 7
- 2026Draft Less, Retrieve More: Hybrid Tree Construction for Speculative Decodingcited by 6
- 2025PromptDistill: Query-based Selective Token Retention in Intermediate Layers for Efficient Large Language Model Inferencecited by 1
- 2026A Sparse Glimpse of the Whole: Train-Free Self-Speculative Decodingcited by 1
- 2026ASPIRE: Asynchronous Batched Self-Speculative Decoding for Long-Context LLM Inferencecited by 1
- 2026KAP: Bridging the Knowledge Selection-Runtime Consumption Gap in LLM Systemscited by 0
- 2026Strong Drafts Need Compact Memories: Long-Context Speculative Decoding with Compressed KV Cachecited by 0
- 2026ASPIRE: Asynchronous Batched Self-Speculative Decoding for Long-Context LLM Inference16 Sep 2026
- 2026Strong Drafts Need Compact Memories: Long-Context Speculative Decoding with Compressed KV Cache31 Aug 2026
- 2026A Sparse Glimpse of the Whole: Train-Free Self-Speculative Decoding30 Jul 2026
- 2026KAP: Bridging the Knowledge Selection-Runtime Consumption Gap in LLM Systems27 Jul 2026
- 2026Draft Less, Retrieve More: Hybrid Tree Construction for Speculative Decoding19 May 2026
- 2026Vegas: Self-Speculative Decoding with Verification-Guided Sparse Attention6 Feb 2026
- 2025ContextPilot: Fast Long-Context Inference via Context Reuse5 Nov 2025
- 2025PromptDistill: Query-based Selective Token Retention in Intermediate Layers for Efficient Large Language Model Inference30 Mar 2025
Similar, not cited
Close in wording, no citation either way
- 2025REFRAG: Rethinking RAG based Decoding
- 2025SpecExtend: A Drop-in Enhancement for Speculative Decoding of Long Sequences
- 2024Accelerating Inference of Retrieval-Augmented Generation via Sparse Context Selection
- 2024Unlocking Efficiency in Large Language Model Inference: A Comprehensive Survey of Speculative Decoding
- 2024Closer Look at Efficient Inference Methods: A Survey of Speculative Decoding
- 2025OWL: Overcoming Window Length-Dependence in Speculative Decoding for Long-Context Inputs
- 2025READER: Retrieval-Assisted Drafter for Efficient LLM Inference
- 2025Accelerating LLM Inference with Lossless Speculative Decoding Algorithms for Heterogeneous Vocabularies