mlsanityData to 14 Oct 2026

ILRe: Intermediate Layer Retrieval for Context Compression in Causal Language Models

arXiv 2508.17892 ↗First posted 25 Aug 2025cs.CL cs.LGcited by 3

On the map: Efficient LLM inference and serving → Prompt and context compression

Abstract (arXiv)

Large Language Models (LLMs) have demonstrated success across many benchmarks. However, they still exhibit limitations in long-context scenarios, primarily due to their short effective context length, quadratic computational complexity, and high memory overhead when processing lengthy inputs. To mitigate these issues, we introduce a novel context compression pipeline, called Intermediate Layer Retrieval (ILRe), which determines one intermediate decoder layer offline, encodes context by streaming chunked prefill only up to that layer, and recalls tokens by the attention scores between the input query and full key cache in that specified layer. In particular, we propose a multi-pooling kernels allocating strategy in the token recalling process to maintain the completeness of semantics. Our approach not only reduces the prefilling complexity from O(L2) to O(L) and trims the memory footprint to a few tenths of that required for the full context, but also delivers performance comparable to or superior to the full-context setup in long-context scenarios. Without additional post training or operator development, ILRe can process a single 1M tokens request in less than half a minute (speedup ≈ 180×) and scores RULER-1M benchmark of ≈ 79.8 with model Llama-3.1-UltraLong-8B-1M-Instruct on a Huawei Ascend 910B NPU.

Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Placed in Prompt and context compression, one of 12 directions in Efficient LLM inference and serving. Builds on 43 of its 50 references that are in the map. First posted on arXiv 25 Aug 2025.

Builds on

43 of 50 references.

Closest ancestors · 3

Same direction, newest first

  1. 2024PCToolkit: A Unified Plug-and-Play Prompt Compression Toolkit of Large Language Models26 Mar
  2. 2024LLMLingua-2: Data Distillation for Efficient and Faithful Task-Agnostic Prompt Compression19 Mar
  3. 2023LongLLMLingua: Accelerating and Enhancing LLMs in Long Context Scenarios via Prompt Compression10 Oct

Other references · 40

  1. 2025Qwen3 Technical Reportcited by 8,820
  2. 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,944
  3. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
  4. 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
  5. 2023Retrieval-Augmented Generation for Large Language Models: A Surveycited by 2,212
  6. 2023Efficient Streaming Language Models with Attention Sinkscited by 2,186
  7. 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,417
  8. 2023GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpointscited by 1,346
  9. 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,346
  10. 2025Qwen3 Embedding: Advancing Text Embedding and Reranking Through Foundation Modelscited by 1,261
  11. 2023SGLang: Efficient Execution of Structured Language Model Programscited by 1,141
  12. 2024SnapKV: LLM Knows What You are Looking for Before Generationcited by 880
28 more
  1. 2023H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Modelscited by 832
  2. 2024Large Language Model based Multi-Agents: A Survey of Progress and Challengescited by 769
  3. 2023YaRN: Efficient Context Window Extension of Large Language Modelscited by 601
  4. 2024Quest: Query-Aware Sparsity for Efficient Long-Context LLM Inferencecited by 501
  5. 2023Model Tells You What to Discard: Adaptive KV Cache Compression for LLMscited by 474
  6. 2023Learning to Compress Prompts with Gist Tokenscited by 390
  7. 2019Linguistic Knowledge and Transferability of Contextual Representationscited by 383
  8. 2024MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attentioncited by 383
  9. 2023Adapting Language Models to Compress Contextscited by 356
  10. 2024DuoAttention: Efficient Long-Context LLM Inference with Retrieval and Streaming Headscited by 288
  11. 2023LLMLingua: Compressing Prompts for Accelerated Inference of Large Language Modelscited by 287
  12. 2024Retrieval Head Mechanistically Explains Long-Context Factualitycited by 232
  13. 2024CacheBlend: Fast Large Language Model Serving for RAG with Cached Knowledge Fusioncited by 223
  14. 2022A Length-Extrapolatable Transformercited by 127
  15. 2024RetrievalAttention: Accelerating Long-Context LLM Inference via Vector Retrievalcited by 116
  16. 2024Not All Heads Matter: A Head-Level KV Cache Compression Method with Integrated Retrieval and Reasoningcited by 97
  17. 2024LazyLLM: Dynamic Token Pruning for Efficient Long Context LLM Inferencecited by 70
  18. 2024A Comprehensive Survey of Retrieval-Augmented Generation (RAG): Evolution, Current Landscape and Future Directionscited by 70
  19. 2024Training-Free Long-Context Scaling of Large Language Modelscited by 62
  20. 2024Sparser is Faster and Less is More: Efficient Sparse Attention for Long-Range Transformerscited by 52
  21. 2021Keep it Simple: Unsupervised Simplification of Multi-Paragraph Textcited by 45
  22. 2024KV Cache Compression, But What Must We Give in Return? A Comprehensive Benchmark of Long Context Capable Approachescited by 42
  23. 2024Block-Attention for Efficient Prefillingcited by 37
  24. 2023Length Extrapolation of Transformers: A Survey from the Perspective of Positional Encodingcited by 32
  25. 2024Accelerating Inference in Large Language Models with a Unified Layer Skipping Strategycited by 17
  26. 2025From 128K to 4M: Efficient Training of Ultra-Long Context Large Language Modelscited by 14
  27. 2025Multimodal Large Language Models for Image, Text, and Speech Data Augmentation: A Surveycited by 7
  28. 2025Optimizing Multi-Hop Document Retrieval Through Intermediate Representationscited by 5

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 3.

3 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024Enhancing and Accelerating Large Language Models via Instruction-Aware Contextual Compression
  2. 2025Beyond Hard and Soft: Hybrid Context Compression for Balancing Local and Global Information Retention
  3. 2024Recurrent Context Compression: Efficiently Expanding the Context Window of LLM
  4. 2026End-to-End Context Compression at Scale
  5. 2026TopoCompress: Long Context Compression via Graph-Wired Semantic Trajectories
  6. 2026Stacked from One: Multi-Scale Self-Injection for Context Window Extension
  7. 2024Two are better than one: Context window extension with multi-grained self-injection
  8. 2025ChunkKV: Semantic-Preserving KV Cache Compression for Efficient Long-Context LLM Inference