mlsanityData to 14 Oct 2026

Cache Me If You Can: How Many KVs Do You Need for Effective Long-Context LMs?

arXiv 2506.17121 ↗First posted 20 Jun 2025cs.CLcited by 10

Not on the map. Why?

Abstract (arXiv)

Language models handle increasingly long contexts for tasks such as book summarization, but this leads to growing memory costs for the key-value (KV) cache. Many prior works have proposed ways of discarding KVs from memory, but their approaches are tailored to favorable settings, obscuring caveats like high peak memory and performance degradation, and a fair comparison between methods is difficult. In this paper, we propose the *KV footprint* as a unified metric, which accounts for both the amount of KV entries stored and their lifespan in memory. We evaluate methods based on the smallest footprint they attain while preserving performance in both long-context understanding and generation, with context lengths of up to 128K tokens. This metric reveals the high peak memory of prior KV eviction methods. One class of methods -- *post-fill eviction* -- has a high footprint due to being incompatible with eviction during pre-filling. We adapt these methods to be able to evict KVs during pre-filling, achieving substantially lower KV footprints. We then turn to *recency eviction* methods, wherein we propose PruLong, an end-to-end optimization method for learning which attention heads need to retain the full KV cache and which do not. PruLong saves memory while preserving long-context performance, achieving 12% smaller KV footprint than prior methods while retaining performance in challenging recall tasks. Our paper clarifies the complex tangle of long-context inference methods and paves the way for future development to minimize the KV footprint.

Key facts. Cited by 10 papers in the map (data through 14 Oct 2026). Builds on 56 of its 64 references that are in the map. First posted on arXiv 20 Jun 2025.

Builds on

56 of 64 references.

References · 56

  1. 2017Attention Is All You Needcited by 60,361
  2. 2024The Llama 3 Herd of Modelscited by 14,715
  3. 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
  4. 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,718
  5. 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,754
  6. 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,455
  7. 2017TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehensioncited by 2,955
  8. 2016Categorical Reparameterization with Gumbel-Softmaxcited by 2,739
  9. 2021Efficiently Modeling Long Sequences with Structured State Spacescited by 2,465
  10. 2023Efficient Streaming Language Models with Attention Sinkscited by 2,186
  11. 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
  12. 2022GPTQ: Accurate Post-Training Quantization for Generative Pre-trained Transformerscited by 1,919
38 more
  1. 2022Fast Inference from Transformers via Speculative Decodingcited by 1,653
  2. 2016MS MARCO: A Human Generated MAchine Reading COmprehension Datasetcited by 1,605
  3. 2022SmoothQuant: Accurate and Efficient Post-Training Quantization for Large Language Modelscited by 1,386
  4. 2023GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpointscited by 1,346
  5. 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,346
  6. 2016The Concrete Distribution: A Continuous Relaxation of Discrete Random Variablescited by 1,148
  7. 2023SGLang: Efficient Execution of Structured Language Model Programscited by 1,141
  8. 2024DeepSeek-V2: A Strong, Economical, and Efficient Mixture-of-Experts Language Modelcited by 1,135
  9. 2022When Not to Trust Language Models: Investigating Effectiveness of Parametric and Non-Parametric Memoriescited by 1,128
  10. 2024SnapKV: LLM Knows What You are Looking for Before Generationcited by 880
  11. 2023Enhancing Chat Language Models by Scaling High-quality Instructional Conversationscited by 839
  12. 2023H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Modelscited by 832
  13. 2023RWKV: Reinventing RNNs for the Transformer Eracited by 827
  14. 2023Retentive Network: A Successor to Transformer for Large Language Modelscited by 613
  15. 2017The NarrativeQA Reading Comprehension Challengecited by 597
  16. 2017Learning Sparse Neural Networks through L0 Regularizationcited by 583
  17. 2024Quest: Query-Aware Sparsity for Efficient Long-Context LLM Inferencecited by 501
  18. 2023Model Tells You What to Discard: Adaptive KV Cache Compression for LLMscited by 474
  19. 2020Efficient Intent Detection with Dual Sentence Encoderscited by 433
  20. 2025Native Sparse Attention: Hardware-Aligned and Natively Trainable Sparse Attentioncited by 407
  21. 2023Hyena Hierarchy: Towards Larger Convolutional Language Modelscited by 393
  22. 2019An Evaluation Dataset for Intent Classification and Out-of-Scope Predictioncited by 386
  23. 2024MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attentioncited by 383
  24. 2024∞Bench: Extending Long Context Evaluation Beyond 100K Tokenscited by 367
  25. 2024DuoAttention: Efficient Long-Context LLM Inference with Retrieval and Streaming Headscited by 288
  26. 2023SARATHI: Efficient LLM Inference by Piggybacking Decodes with Chunked Prefillscited by 193
  27. 2019Benchmarking Natural Language Understanding Services for building Conversational Agentscited by 166
  28. 2024How to Train Long-Context Language Models (Effectively)cited by 146
  29. 2024You Only Cache Once: Decoder-Decoder Architectures for Language Modelscited by 144
  30. 2024NATURAL PLAN: Benchmarking LLMs on Natural Language Planningcited by 128
  31. 2024HELMET: How to Evaluate Long-Context Language Models Effectively and Thoroughlycited by 125
  32. 2024The Mamba in the Llama: Distilling and Accelerating Hybrid Modelscited by 122
  33. 2024MagicDec: Breaking the Latency-Throughput Tradeoff for Long Context Generation with Speculative Decodingcited by 91
  34. 2024A Simple and Effective L2 Norm-Based Strategy for KV Cache Compressioncited by 86
  35. 2024SCBench: A KV Cache-Centric Analysis of Long-Context Methodscited by 60
  36. 2022Multi-LexSum: Real-World Summaries of Civil Rights Lawsuits at Multiple Granularitiescited by 47
  37. 2024Mixture of Attention Spans: Optimizing LLM Inference Efficiency with Heterogeneous Sliding-Window Lengthscited by 44
  38. 2024NACL: A General and Effective KV Cache Eviction Framework for LLMs at Inference Timecited by 43

50 most cited of 56 All 56 (JSON)

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 4; 2026: 6.

10 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024KV Cache Compression, But What Must We Give in Return? A Comprehensive Benchmark of Long Context Capable Approaches
  2. 2026KV Cache Offloading for Context-Intensive Tasks
  3. 2024KV-Compress: Paged KV-Cache Compression with Variable Compression Rates per Attention Head
  4. 2024ClusterKV: Manipulating LLM KV Cache in Semantic Space for Recallable Compression
  5. 2026Reformulating KV Cache Eviction Problem for Long-Context LLM Inference
  6. 2025KV Cache Compression for Inference Efficiency in LLMs: A Review
  7. 2026Rethinking KV Cache Eviction via a Unified Information-Theoretic Objective
  8. 2025Key, Value, Compress: A Systematic Exploration of KV Cache Compression Techniques