APE: Faster and Longer Context-Augmented Generation via Adaptive Parallel Encoding
Not on the map. Why?
Abstract (arXiv)
Context-augmented generation (CAG) techniques, including RAG and ICL, require the efficient combination of multiple contexts to generate responses to user queries. Directly inputting these contexts as a sequence introduces a considerable computational burden by re-encoding the combined selection of contexts for every request. To address this, we explore the promising potential of parallel encoding to independently pre-compute and cache each context's KV states. This approach enables the direct loading of cached states during inference while accommodating more contexts through position reuse across contexts. However, due to misalignments in attention distribution, directly applying parallel encoding results in a significant performance drop. To enable effective and efficient CAG, we propose Adaptive Parallel Encoding (APE), which brings shared prefix, attention temperature, and scaling factor to align the distribution of parallel encoding with sequential encoding. Results on RAG and ICL tasks demonstrate that APE can preserve 98% and 93% sequential encoding performance using the same inputs while outperforming parallel encoding by 3.6% and 7.9%, respectively. It also scales to many-shot CAG, effectively encoding hundreds of contexts in parallel. Efficiency evaluation shows that APE can achieve an end-to-end 4.5× speedup by reducing 28× prefilling time for a 128K-length context.
Key facts. Cited by 29 papers in the map (data through 7 Oct 2026). First posted on arXiv 8 Feb 2025.
Builds on
0 of 0 references.
No references here yet.
Built on by
Citing papers per year: 2025: 14; 2026: 15.
29 papers.
Sort:
By area:
- 2025Parallel-R1: Towards Parallel Thinking via Reinforcement Learningcited by 59
- 2025Multiverse: Your Language Models Secretly Decide How to Parallelize and Merge Generationcited by 30
- 2025CacheClip: Accelerating RAG with Effective KV Cache Reusecited by 14
- 2025ParallelComp: Parallel Long-Context Compressor for Length Extrapolationcited by 13
- 2025ContextPilot: Fast Long-Context Inference via Context Reusecited by 8
- 2025A3: Attention-Aware Accurate KV Cache Fusion for Fast Large Language Model Servingcited by 7
- 2025Delta Attention: Fast and Accurate Sparse Attention Inference by Delta Correctioncited by 6
- 2025Graph-KV: Breaking Sequence via Injecting Structural Biases into Large Language Modelscited by 6
- 2026RelayCaching: Accelerating LLM Collaboration via Decoding KV Cache Reusecited by 6
- 2026An experimental study of KV cache reuse strategies in chunk-level caching systemscited by 5
- 2025Haystack Engineering: Context Engineering for Heterogeneous and Agentic Long-Context Evaluationcited by 4
- 2026KVEraser: Learning to Steer KV Cache for Efficient Localized Context Erasingcited by 4
17 more
- 2025APB: Accelerating Distributed Long-Context Inference by Passing Compressed Context Blocks across GPUscited by 3
- 2025Weak-to-Strong GraphRAG: Aligning Weak Retrievers with Large Language Models for Graph-based Retrieval Augmented Generationcited by 3
- 2026Parallel Context-of-Experts Decoding for Retrieval Augmented Generationcited by 1
- 2026CoMem: Reusing Transformer Depth across Queries with Persistent Intermediate Residualscited by 1
- 2026What It Costs to Compose, Rebuild, and Correct Precomputed Memorycited by 1
- 2025PEVLM: Parallel Encoding for Vision-Language Modelscited by 0
- 2025Struc-EMB: The Potential of Structure-Aware Encoding in Language Embeddingscited by 0
- 2025HA-RAG: Hotness-Aware RAG Acceleration via Mixed Precision and Data Placementcited by 0
- 2026Context Memorization for Efficient Long Context Generationcited by 0
- 2026Towards Direct Latent-Space Synthesis for Parallel Branches in LLM-Agent Workflowscited by 0
- 2026MaSRead: Content-Addressed Reading of Replicated Latent Storescited by 0
- 2026PARSER: Read in Parallel, Reason in Depth for Long-Context LLM Agentscited by 0
- 2026Fine-Tuning a KV Cache Concatenation-Aware Model or Recomputing KV Caches? Why Not Both?cited by 0
- 2026KVShareArena: KV-Cache Reuse Across Contexts and Model Checkpointscited by 0
- 2026Evaluating the accuracy of KV cache reuse techniquescited by 0
- 2026CacheRepair: Learning to Repair Cross-Chunk Context in RAG for KV Cache Fusioncited by 0
- 2026ATTUNER: Recomputation-Free KV Cache Reuse via Query-Side Adaptationcited by 0
- 2026ATTUNER: Recomputation-Free KV Cache Reuse via Query-Side Adaptation29 Sep 2026
- 2026CacheRepair: Learning to Repair Cross-Chunk Context in RAG for KV Cache Fusion28 Sep 2026
- 2026Evaluating the accuracy of KV cache reuse techniques25 Sep 2026
- 2026KVShareArena: KV-Cache Reuse Across Contexts and Model Checkpoints9 Sep 2026
- 2026Fine-Tuning a KV Cache Concatenation-Aware Model or Recomputing KV Caches? Why Not Both?9 Sep 2026
- 2026PARSER: Read in Parallel, Reason in Depth for Long-Context LLM Agents6 Sep 2026
- 2026What It Costs to Compose, Rebuild, and Correct Precomputed Memory31 Aug 2026
- 2026CoMem: Reusing Transformer Depth across Queries with Persistent Intermediate Residuals30 Jul 2026
- 2026MaSRead: Content-Addressed Reading of Replicated Latent Stores21 Jul 2026
- 2026KVEraser: Learning to Steer KV Cache for Efficient Localized Context Erasing15 Jun 2026
- 2026Towards Direct Latent-Space Synthesis for Parallel Branches in LLM-Agent Workflows12 Jun 2026
- 2026Context Memorization for Efficient Long Context Generation18 May 2026
17 more
- 2026An experimental study of KV cache reuse strategies in chunk-level caching systems3 Mar 2026
- 2026RelayCaching: Accelerating LLM Collaboration via Decoding KV Cache Reuse28 Feb 2026
- 2026Parallel Context-of-Experts Decoding for Retrieval Augmented Generation13 Jan 2026
- 2025A3: Attention-Aware Accurate KV Cache Fusion for Fast Large Language Model Serving13 Nov 2025
- 2025ContextPilot: Fast Long-Context Inference via Context Reuse5 Nov 2025
- 2025HA-RAG: Hotness-Aware RAG Acceleration via Mixed Precision and Data Placement23 Oct 2025
- 2025CacheClip: Accelerating RAG with Effective KV Cache Reuse11 Oct 2025
- 2025Struc-EMB: The Potential of Structure-Aware Encoding in Language Embeddings9 Oct 2025
- 2025Haystack Engineering: Context Engineering for Heterogeneous and Agentic Long-Context Evaluation8 Oct 2025
- 2025Parallel-R1: Towards Parallel Thinking via Reinforcement Learning9 Sep 2025
- 2025Weak-to-Strong GraphRAG: Aligning Weak Retrievers with Large Language Models for Graph-based Retrieval Augmented Generation26 Jun 2025
- 2025PEVLM: Parallel Encoding for Vision-Language Models24 Jun 2025
- 2025Multiverse: Your Language Models Secretly Decide How to Parallelize and Merge Generation11 Jun 2025
- 2025Graph-KV: Breaking Sequence via Injecting Structural Biases into Large Language Models9 Jun 2025
- 2025Delta Attention: Fast and Accurate Sparse Attention Inference by Delta Correction16 May 2025
- 2025ParallelComp: Parallel Long-Context Compressor for Length Extrapolation20 Feb 2025
- 2025APB: Accelerating Distributed Long-Context Inference by Passing Compressed Context Blocks across GPUs17 Feb 2025
- 2025ParallelComp: Parallel Long-Context Compressor for Length Extrapolationcited by 13
- 2025ContextPilot: Fast Long-Context Inference via Context Reusecited by 8
- 2025Graph-KV: Breaking Sequence via Injecting Structural Biases into Large Language Modelscited by 6
- 2026KVEraser: Learning to Steer KV Cache for Efficient Localized Context Erasingcited by 4
- 2026What It Costs to Compose, Rebuild, and Correct Precomputed Memorycited by 1
- 2026MaSRead: Content-Addressed Reading of Replicated Latent Storescited by 0
- 2026KVShareArena: KV-Cache Reuse Across Contexts and Model Checkpointscited by 0
- 2026Evaluating the accuracy of KV cache reuse techniquescited by 0
- 2026ATTUNER: Recomputation-Free KV Cache Reuse via Query-Side Adaptationcited by 0
- 2026ATTUNER: Recomputation-Free KV Cache Reuse via Query-Side Adaptation29 Sep 2026
- 2026Evaluating the accuracy of KV cache reuse techniques25 Sep 2026
- 2026KVShareArena: KV-Cache Reuse Across Contexts and Model Checkpoints9 Sep 2026
- 2026What It Costs to Compose, Rebuild, and Correct Precomputed Memory31 Aug 2026
- 2026MaSRead: Content-Addressed Reading of Replicated Latent Stores21 Jul 2026
- 2026KVEraser: Learning to Steer KV Cache for Efficient Localized Context Erasing15 Jun 2026
- 2025ContextPilot: Fast Long-Context Inference via Context Reuse5 Nov 2025
- 2025Graph-KV: Breaking Sequence via Injecting Structural Biases into Large Language Models9 Jun 2025
- 2025ParallelComp: Parallel Long-Context Compressor for Length Extrapolation20 Feb 2025
- 2025CacheClip: Accelerating RAG with Effective KV Cache Reusecited by 14
- 2025A3: Attention-Aware Accurate KV Cache Fusion for Fast Large Language Model Servingcited by 7
- 2026An experimental study of KV cache reuse strategies in chunk-level caching systemscited by 5
- 2025Weak-to-Strong GraphRAG: Aligning Weak Retrievers with Large Language Models for Graph-based Retrieval Augmented Generationcited by 3
- 2026Parallel Context-of-Experts Decoding for Retrieval Augmented Generationcited by 1
- 2025HA-RAG: Hotness-Aware RAG Acceleration via Mixed Precision and Data Placementcited by 0
- 2026Fine-Tuning a KV Cache Concatenation-Aware Model or Recomputing KV Caches? Why Not Both?cited by 0
- 2026CacheRepair: Learning to Repair Cross-Chunk Context in RAG for KV Cache Fusioncited by 0
- 2026CacheRepair: Learning to Repair Cross-Chunk Context in RAG for KV Cache Fusion28 Sep 2026
- 2026Fine-Tuning a KV Cache Concatenation-Aware Model or Recomputing KV Caches? Why Not Both?9 Sep 2026
- 2026An experimental study of KV cache reuse strategies in chunk-level caching systems3 Mar 2026
- 2026Parallel Context-of-Experts Decoding for Retrieval Augmented Generation13 Jan 2026
- 2025A3: Attention-Aware Accurate KV Cache Fusion for Fast Large Language Model Serving13 Nov 2025
- 2025HA-RAG: Hotness-Aware RAG Acceleration via Mixed Precision and Data Placement23 Oct 2025
- 2025CacheClip: Accelerating RAG with Effective KV Cache Reuse11 Oct 2025
- 2025Weak-to-Strong GraphRAG: Aligning Weak Retrievers with Large Language Models for Graph-based Retrieval Augmented Generation26 Jun 2025
- 2026RelayCaching: Accelerating LLM Collaboration via Decoding KV Cache Reusecited by 6
- 2025Haystack Engineering: Context Engineering for Heterogeneous and Agentic Long-Context Evaluationcited by 4
- 2026Towards Direct Latent-Space Synthesis for Parallel Branches in LLM-Agent Workflowscited by 0
- 2026PARSER: Read in Parallel, Reason in Depth for Long-Context LLM Agentscited by 0
- 2026PARSER: Read in Parallel, Reason in Depth for Long-Context LLM Agents6 Sep 2026
- 2026Towards Direct Latent-Space Synthesis for Parallel Branches in LLM-Agent Workflows12 Jun 2026
- 2026RelayCaching: Accelerating LLM Collaboration via Decoding KV Cache Reuse28 Feb 2026
- 2025Haystack Engineering: Context Engineering for Heterogeneous and Agentic Long-Context Evaluation8 Oct 2025
- 2025PEVLM: Parallel Encoding for Vision-Language Modelscited by 0
- 2025PEVLM: Parallel Encoding for Vision-Language Models24 Jun 2025
- 2025Multiverse: Your Language Models Secretly Decide How to Parallelize and Merge Generationcited by 30
- 2025Delta Attention: Fast and Accurate Sparse Attention Inference by Delta Correctioncited by 6
- 2025APB: Accelerating Distributed Long-Context Inference by Passing Compressed Context Blocks across GPUscited by 3
- 2026CoMem: Reusing Transformer Depth across Queries with Persistent Intermediate Residualscited by 1
- 2025Struc-EMB: The Potential of Structure-Aware Encoding in Language Embeddingscited by 0
- 2026Context Memorization for Efficient Long Context Generationcited by 0
- 2026CoMem: Reusing Transformer Depth across Queries with Persistent Intermediate Residuals30 Jul 2026
- 2026Context Memorization for Efficient Long Context Generation18 May 2026
- 2025Struc-EMB: The Potential of Structure-Aware Encoding in Language Embeddings9 Oct 2025
- 2025Multiverse: Your Language Models Secretly Decide How to Parallelize and Merge Generation11 Jun 2025
- 2025Delta Attention: Fast and Accurate Sparse Attention Inference by Delta Correction16 May 2025
- 2025APB: Accelerating Distributed Long-Context Inference by Passing Compressed Context Blocks across GPUs17 Feb 2025
Similar, not cited
Close in wording, no citation either way
- 2026SPARC-RAG: Adaptive Sequential-Parallel Scaling with Context Management for Retrieval-Augmented Generation
- 2025RAPID: Long-Context Inference with Retrieval-Augmented Speculative Decoding
- 2025Scaling Test-Time Inference with Policy-Optimized, Dynamic Retrieval-Augmented Generation via KV Caching and Decoding
- 2025Enhancing Cache-Augmented Generation (CAG) with Adaptive Contextual Compression for Scalable Knowledge Integration
- 2024Inference Scaling for Long-Context Retrieval Augmented Generation
- 2025Retrospective Sparse Attention for Efficient Long-Context Generation
- 2024Context Embeddings for Efficient Answer Generation in RAG
- 2025Enhancing RAG Efficiency with Adaptive Context Compression