DynamicKV: Task-Aware Adaptive KV Cache Compression for Long Context LLMs
On the map: Efficient LLM inference and serving → KV cache optimization
Abstract (arXiv)
Efficient KV cache management in LLMs is crucial for long-context tasks like RAG and summarization. Existing KV cache compression methods enforce a fixed pattern, neglecting task-specific characteristics and reducing the retention of essential information. However, we observe distinct activation patterns across layers in various tasks, highlighting the need for adaptive strategies tailored to each task's unique demands. Based on this insight, we propose DynamicKV, a method that dynamically optimizes token retention by adjusting the number of tokens retained at each layer to adapt to the specific task. DynamicKV establishes global and per-layer maximum KV cache budgets, temporarily retaining the maximum budget for the current layer, and periodically updating the KV cache sizes of all preceding layers during inference. Our method retains only 1.7% of the KV cache size while achieving ~85% of the Full KV cache performance on LongBench. Notably, even under extreme compression (0.9%), DynamicKV surpasses state-of-the-art (SOTA) methods by 11% in the Needle-in-a-Haystack test using Mistral-7B-Instruct-v0.2. The code will be released.
Key facts. Cited by 42 papers in the map (data through 7 Oct 2026). Placed in KV cache optimization, one of 12 directions in Efficient LLM inference and serving. Builds on 37 of its 51 references that are in the map. First posted on arXiv 19 Dec 2024.
Builds on
37 of 51 references.
Closest ancestors · 7
Same direction, newest first
- 2024PyramidKV: Dynamic KV Cache Compression based on Pyramidal Information Funneling4 Jun
- 2024Reducing Transformer Key-Value Cache Size with Cross-Layer Attention21 May
- 2024SnapKV: LLM Knows What You are Looking for Before Generation22 Apr
- 2024GEAR: An Efficient KV Cache Compression Recipe for Near-Lossless Generative Inference of LLM8 Mar
- 2023Model Tells You What to Discard: Adaptive KV Cache Compression for LLMs3 Oct
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttention12 Sep
- 2023Scissorhands: Exploiting the Persistence of Importance Hypothesis for LLM KV Cache Compression at Test Time26 May
Other references · 30
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2023GPT-4 Technical Reportcited by 18,132
- 2024The Llama 3 Herd of Modelscited by 14,192
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,160
- 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,686
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,383
- 2017TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehensioncited by 2,895
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
- 2024Qwen2 Technical Reportcited by 2,076
- 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,378
18 more
- 2020Constructing A Multi-hop QA Dataset for Comprehensive Evaluation of Reasoning Stepscited by 1,259
- 2017The NarrativeQA Reading Comprehension Challengecited by 590
- 2024KVQuant: Towards 10 Million Context Length LLM Inference with KV Cache Quantizationcited by 571
- 2019SAMSum Corpus: A Human-annotated Dialogue Dataset for Abstractive Summarizationcited by 530
- 2021A Dataset of Information-Seeking Questions and Answers Anchored in Research Paperscited by 475
- 2019Multi-News: a Large-Scale Multi-Document Summarization Dataset and Abstractive Hierarchical Modelcited by 431
- 2021QMSum: A New Benchmark for Query-based Multi-domain Meeting Summarizationcited by 363
- 2023RepoBench: Benchmarking Repository-Level Code Auto-Completion Systemscited by 346
- 2021Efficient Attentions for Long Document Summarizationcited by 342
- 2024LayerSkip: Enabling Early Exit Inference and Self-Speculative Decodingcited by 302
- 2023Can ChatGPT Understand Too? A Comparative Study on ChatGPT and Fine-tuned BERTcited by 155
- 2023Towards Making the Most of ChatGPT for Machine Translationcited by 138
- 2024You Only Cache Once: Decoder-Decoder Architectures for Language Modelscited by 135
- 2024Dynamic Memory Compression: Retrofitting LLMs for Accelerated Inferencecited by 115
- 2023LongCoder: A Long-Range Pre-trained Language Model for Code Completioncited by 110
- 2024Not All Layers of LLMs Are Necessary During Inferencecited by 95
- 2024LazyLLM: Dynamic Token Pruning for Efficient Long Context LLM Inferencecited by 70
- 2024mathbbUSCD: Improving Code Generation of LLMs by Uncertainty-Aware Selective Contrastive Decodingcited by 6
Built on by
Citing papers per year: 2024: 1; 2025: 11; 2026: 30.
42 papers.
Sort:
By area:
- 2024A Survey on Large Language Model Acceleration based on KV Cache Managementcited by 125
- 2025OmniSVG: A Unified Scalable Vector Graphics Generation Modelcited by 71
- 2025Twilight: Adaptive Attention Sparsity with Hierarchical Top-p Pruningcited by 48
- 2025SentenceKV: Efficient LLM Inference via Sentence-Level Semantic KV Cachingcited by 9
- 2026ReST-KV: Robust KV Cache Eviction with Layer-wise Output Reconstruction and Spatial-Temporal Smoothingcited by 9
- 2025Infinite Retrieval: Attention Enhanced LLMs in Long-Context Processingcited by 7
- 2026Don't Waste Bits! Adaptive KV-Cache Quantization for Lightweight On-Device LLMscited by 7
- 2026MKA: Memory-Keyed Attention for Efficient Long-Context Reasoningcited by 6
- 2026From Prefix Cache to Fusion RAG Cache: Accelerating LLM Inference in Retrieval-Augmented Generationcited by 5
- 2026When Less Latent Leads to Better Relay: Information-Preserving Compression for Latent Multi-Agent LLM Collaborationcited by 5
- 2025MorphServe: Efficient and Workload-Aware LLM Serving via Runtime Quantized Layer Swapping and KV Cache Resizingcited by 4
- 2025Alleviating Forgetfulness of Linear Attention by Hybrid Sparse Attention and Contextualized Learnable Token Evictioncited by 3
30 more
- 2026Adaptive Layer Selection for Layer-Wise Token Pruning in LLM Inferencecited by 3
- 2026From Static Inference to Dynamic Interaction: A Survey of Streaming Large Language Modelscited by 3
- 2026ReasonAlloc: Hierarchical Decoding-Time KV Cache Budget Allocation for Reasoning Modelscited by 3
- 2026MemDecay: Region-Aware KV Cache Eviction for Efficient LLM Agent Inferencecited by 3
- 2025Adaptive and Resource-efficient Agentic AI Systems for Mobile and Embedded Devices: A Surveycited by 2
- 2026Towards Efficient Large Language Model Serving: A Survey on System-Aware KV Cache Optimizationcited by 2
- 2025Mixture of Weight-shared Heterogeneous Group Attention Experts for Dynamic Token-wise KV Optimizationcited by 1
- 2025CaliDrop: KV Cache Compression with Calibrationcited by 1
- 2025TPLA: Tensor Parallel Latent Attention for Efficient Disaggregated Prefill and Decode Inferencecited by 1
- 2026CompilerKV: Risk-Adaptive KV Compression via Offline Experience Compilationcited by 1
- 2026AsyncTLS: Efficient Generative LLM Inference with Asynchronous Two-level Sparse Attentioncited by 1
- 2026Transactional Attention: Semantic Sponsorship for KV-Cache Retentioncited by 1
- 2026Exploring a Layer-Wise Design Space for KV Cache Evictioncited by 1
- 2026Finetuning Vision-Language-Action Models Requires Fewer Layers Than You Thinkcited by 1
- 2026Epiphany-Aware KV Cache Eviction Without the Attention Matrixcited by 1
- 2026RippleKV: Cross-Layer KV Cache Allocation via Perturbation Propagationcited by 1
- 2026Monte Carlo Estimation for KV Cache Evictioncited by 1
- 2025KVCrush: Key value cache size-reduction using similarity in head-behaviourcited by 0
- 2026Slow-Fast Inference: Training-Free Inference Acceleration via Within-Sentence Support Stabilitycited by 0
- 2026Towards Efficient Large Vision-Language Models: A Comprehensive Survey on Inference Strategiescited by 0
- 2026HieraSparse: Hierarchical Semi-Structured Sparse KV Attentioncited by 0
- 2026AnchorKV: Safety-Aware KV Cache Compression via Soft Penalty with a Refusal Anchorcited by 0
- 2026HiKV: Hierarchical Importance-Aware KV Cache with Hardware Acceleration for LLM Decodingcited by 0
- 2026Minima-KV: Retention-Preserving KV Cache Compression with Mixed-Format Paged Attentioncited by 0
- 2026Parser States Already Know: Structure-Conditioned KV Persistence for Structured Generationcited by 0
- 2026ECOKV: Geometry-Aware KV Cache Eviction via Complementary Diversity Metricscited by 0
- 2026What Must Survive? Exact Task-Information--State Frontiers Under Partial Task Revelationcited by 0
- 2026Risk-Controlled KV-Cache Eviction: From Memory Budgets to Risk Targetscited by 0
- 2026CORE: COverage CAlibration and Evicted-Mass REdistribution for KV Cachecited by 0
- 2026WakeKV: Reactive, Reversible KV Residency for Heads That Change Their Mindscited by 0
- 2026Monte Carlo Estimation for KV Cache Eviction6 Oct 2026
- 2026WakeKV: Reactive, Reversible KV Residency for Heads That Change Their Minds2 Oct 2026
- 2026CORE: COverage CAlibration and Evicted-Mass REdistribution for KV Cache28 Sep 2026
- 2026Risk-Controlled KV-Cache Eviction: From Memory Budgets to Risk Targets23 Sep 2026
- 2026What Must Survive? Exact Task-Information--State Frontiers Under Partial Task Revelation18 Sep 2026
- 2026ECOKV: Geometry-Aware KV Cache Eviction via Complementary Diversity Metrics6 Sep 2026
- 2026Parser States Already Know: Structure-Conditioned KV Persistence for Structured Generation28 Aug 2026
- 2026Minima-KV: Retention-Preserving KV Cache Compression with Mixed-Format Paged Attention24 Aug 2026
- 2026RippleKV: Cross-Layer KV Cache Allocation via Perturbation Propagation9 Aug 2026
- 2026HiKV: Hierarchical Importance-Aware KV Cache with Hardware Acceleration for LLM Decoding24 Jul 2026
- 2026MemDecay: Region-Aware KV Cache Eviction for Efficient LLM Agent Inference12 Jul 2026
- 2026Towards Efficient Large Language Model Serving: A Survey on System-Aware KV Cache Optimization9 Jul 2026
30 more
- 2026Epiphany-Aware KV Cache Eviction Without the Attention Matrix25 Jun 2026
- 2026Finetuning Vision-Language-Action Models Requires Fewer Layers Than You Think18 Jun 2026
- 2026AnchorKV: Safety-Aware KV Cache Compression via Soft Penalty with a Refusal Anchor16 Jun 2026
- 2026Exploring a Layer-Wise Design Space for KV Cache Eviction13 Jun 2026
- 2026ReasonAlloc: Hierarchical Decoding-Time KV Cache Budget Allocation for Reasoning Models9 Jun 2026
- 2026ReST-KV: Robust KV Cache Eviction with Layer-wise Output Reconstruction and Spatial-Temporal Smoothing9 May 2026
- 2026HieraSparse: Hierarchical Semi-Structured Sparse KV Attention18 Apr 2026
- 2026When Less Latent Leads to Better Relay: Information-Preserving Compression for Latent Multi-Agent LLM Collaboration14 Apr 2026
- 2026Transactional Attention: Semantic Sponsorship for KV-Cache Retention13 Apr 2026
- 2026AsyncTLS: Efficient Generative LLM Inference with Asynchronous Two-level Sparse Attention9 Apr 2026
- 2026Don't Waste Bits! Adaptive KV-Cache Quantization for Lightweight On-Device LLMs6 Apr 2026
- 2026Towards Efficient Large Vision-Language Models: A Comprehensive Survey on Inference Strategies30 Mar 2026
- 2026MKA: Memory-Keyed Attention for Efficient Long-Context Reasoning21 Mar 2026
- 2026Slow-Fast Inference: Training-Free Inference Acceleration via Within-Sentence Support Stability12 Mar 2026
- 2026From Static Inference to Dynamic Interaction: A Survey of Streaming Large Language Models4 Mar 2026
- 2026CompilerKV: Risk-Adaptive KV Compression via Offline Experience Compilation9 Feb 2026
- 2026From Prefix Cache to Fusion RAG Cache: Accelerating LLM Inference in Retrieval-Augmented Generation19 Jan 2026
- 2026Adaptive Layer Selection for Layer-Wise Token Pruning in LLM Inference12 Jan 2026
- 2025Alleviating Forgetfulness of Linear Attention by Hybrid Sparse Attention and Contextualized Learnable Token Eviction23 Oct 2025
- 2025Adaptive and Resource-efficient Agentic AI Systems for Mobile and Embedded Devices: A Survey30 Sep 2025
- 2025TPLA: Tensor Parallel Latent Attention for Efficient Disaggregated Prefill and Decode Inference21 Aug 2025
- 2025CaliDrop: KV Cache Compression with Calibration26 Jul 2025
- 2025Mixture of Weight-shared Heterogeneous Group Attention Experts for Dynamic Token-wise KV Optimization16 Jun 2025
- 2025MorphServe: Efficient and Workload-Aware LLM Serving via Runtime Quantized Layer Swapping and KV Cache Resizing24 May 2025
- 2025OmniSVG: A Unified Scalable Vector Graphics Generation Model8 Apr 2025
- 2025SentenceKV: Efficient LLM Inference via Sentence-Level Semantic KV Caching1 Apr 2025
- 2025KVCrush: Key value cache size-reduction using similarity in head-behaviour24 Feb 2025
- 2025Infinite Retrieval: Attention Enhanced LLMs in Long-Context Processing18 Feb 2025
- 2025Twilight: Adaptive Attention Sparsity with Hierarchical Top-p Pruning4 Feb 2025
- 2024A Survey on Large Language Model Acceleration based on KV Cache Management27 Dec 2024
- 2025SentenceKV: Efficient LLM Inference via Sentence-Level Semantic KV Cachingcited by 9
- 2026ReST-KV: Robust KV Cache Eviction with Layer-wise Output Reconstruction and Spatial-Temporal Smoothingcited by 9
- 2026Don't Waste Bits! Adaptive KV-Cache Quantization for Lightweight On-Device LLMscited by 7
- 2025MorphServe: Efficient and Workload-Aware LLM Serving via Runtime Quantized Layer Swapping and KV Cache Resizingcited by 4
- 2025Alleviating Forgetfulness of Linear Attention by Hybrid Sparse Attention and Contextualized Learnable Token Evictioncited by 3
- 2026Adaptive Layer Selection for Layer-Wise Token Pruning in LLM Inferencecited by 3
- 2026Towards Efficient Large Language Model Serving: A Survey on System-Aware KV Cache Optimizationcited by 2
- 2025CaliDrop: KV Cache Compression with Calibrationcited by 1
- 2025TPLA: Tensor Parallel Latent Attention for Efficient Disaggregated Prefill and Decode Inferencecited by 1
- 2026AsyncTLS: Efficient Generative LLM Inference with Asynchronous Two-level Sparse Attentioncited by 1
- 2026Transactional Attention: Semantic Sponsorship for KV-Cache Retentioncited by 1
- 2026Exploring a Layer-Wise Design Space for KV Cache Evictioncited by 1
12 most cited of 23 All 23 (JSON)
- 2026Monte Carlo Estimation for KV Cache Eviction6 Oct 2026
- 2026WakeKV: Reactive, Reversible KV Residency for Heads That Change Their Minds2 Oct 2026
- 2026CORE: COverage CAlibration and Evicted-Mass REdistribution for KV Cache28 Sep 2026
- 2026Risk-Controlled KV-Cache Eviction: From Memory Budgets to Risk Targets23 Sep 2026
- 2026Minima-KV: Retention-Preserving KV Cache Compression with Mixed-Format Paged Attention24 Aug 2026
- 2026RippleKV: Cross-Layer KV Cache Allocation via Perturbation Propagation9 Aug 2026
- 2026HiKV: Hierarchical Importance-Aware KV Cache with Hardware Acceleration for LLM Decoding24 Jul 2026
- 2026Towards Efficient Large Language Model Serving: A Survey on System-Aware KV Cache Optimization9 Jul 2026
- 2026AnchorKV: Safety-Aware KV Cache Compression via Soft Penalty with a Refusal Anchor16 Jun 2026
- 2026Exploring a Layer-Wise Design Space for KV Cache Eviction13 Jun 2026
- 2026ReST-KV: Robust KV Cache Eviction with Layer-wise Output Reconstruction and Spatial-Temporal Smoothing9 May 2026
- 2026HieraSparse: Hierarchical Semi-Structured Sparse KV Attention18 Apr 2026
12 newest of 23 All 23 (JSON)
- 2024A Survey on Large Language Model Acceleration based on KV Cache Managementcited by 125
- 2025Infinite Retrieval: Attention Enhanced LLMs in Long-Context Processingcited by 7
- 2026MKA: Memory-Keyed Attention for Efficient Long-Context Reasoningcited by 6
- 2026ReasonAlloc: Hierarchical Decoding-Time KV Cache Budget Allocation for Reasoning Modelscited by 3
- 2025Adaptive and Resource-efficient Agentic AI Systems for Mobile and Embedded Devices: A Surveycited by 2
- 2026Epiphany-Aware KV Cache Eviction Without the Attention Matrixcited by 1
- 2026Towards Efficient Large Vision-Language Models: A Comprehensive Survey on Inference Strategiescited by 0
- 2026Epiphany-Aware KV Cache Eviction Without the Attention Matrix25 Jun 2026
- 2026ReasonAlloc: Hierarchical Decoding-Time KV Cache Budget Allocation for Reasoning Models9 Jun 2026
- 2026Towards Efficient Large Vision-Language Models: A Comprehensive Survey on Inference Strategies30 Mar 2026
- 2026MKA: Memory-Keyed Attention for Efficient Long-Context Reasoning21 Mar 2026
- 2025Adaptive and Resource-efficient Agentic AI Systems for Mobile and Embedded Devices: A Survey30 Sep 2025
- 2025Infinite Retrieval: Attention Enhanced LLMs in Long-Context Processing18 Feb 2025
- 2024A Survey on Large Language Model Acceleration based on KV Cache Management27 Dec 2024
- 2025OmniSVG: A Unified Scalable Vector Graphics Generation Modelcited by 71
- 2025Twilight: Adaptive Attention Sparsity with Hierarchical Top-p Pruningcited by 48
- 2026From Static Inference to Dynamic Interaction: A Survey of Streaming Large Language Modelscited by 3
- 2026CompilerKV: Risk-Adaptive KV Compression via Offline Experience Compilationcited by 1
- 2026Parser States Already Know: Structure-Conditioned KV Persistence for Structured Generationcited by 0
- 2026What Must Survive? Exact Task-Information--State Frontiers Under Partial Task Revelationcited by 0
- 2026What Must Survive? Exact Task-Information--State Frontiers Under Partial Task Revelation18 Sep 2026
- 2026Parser States Already Know: Structure-Conditioned KV Persistence for Structured Generation28 Aug 2026
- 2026From Static Inference to Dynamic Interaction: A Survey of Streaming Large Language Models4 Mar 2026
- 2026CompilerKV: Risk-Adaptive KV Compression via Offline Experience Compilation9 Feb 2026
- 2025OmniSVG: A Unified Scalable Vector Graphics Generation Model8 Apr 2025
- 2025Twilight: Adaptive Attention Sparsity with Hierarchical Top-p Pruning4 Feb 2025
Similar, not cited
Close in wording, no citation either way
- 2025WindowKV: Task-Adaptive Group-Wise KV Cache Window Selection for Efficient LLM Inference
- 2025EvolKV: Evolutionary KV Cache Compression for LLM Inference
- 2025LAVa: Layer-wise KV Cache Eviction with Dynamic Budget Allocation
- 2024ClusterKV: Manipulating LLM KV Cache in Semantic Space for Recallable Compression
- 2026KV-Kaizen: Learning Context-Adaptive Cache Compression Choices
- 2025ZSMerge: Zero-Shot KV Cache Compression for Memory-Efficient Long-Context LLMs
- 2024ZigZagkv: Dynamic KV Cache Compression for Long-context Modeling based on Layer Uncertainty
- 2026KV Cache Offloading for Context-Intensive Tasks