🤖 AI Summary
KV cache grows linearly with context length, becoming a critical bottleneck in GPU memory capacity and bandwidth during large language model inference. This work presents the first systematic taxonomy of existing KV cache optimization techniques, categorizing them into five classes: cache eviction, compression, hybrid memory management, novel attention mechanisms, and hybrid strategies. The study evaluates these approaches across seven representative deployment scenarios, revealing that no single method universally dominates; instead, optimal choices require careful trade-offs among memory usage, throughput, and accuracy based on context length, hardware constraints, and workload characteristics. The paper further advocates adaptive, multi-stage optimization as a promising direction for future research, offering both theoretical insights and practical guidance for real-world deployment.
📝 Abstract
The key-value (KV) cache is a foundational optimization in Transformer-based large language models (LLMs), eliminating redundant recomputation of past token representations during autoregressive generation. However, its memory footprint scales linearly with context length, imposing critical bottlenecks on GPU memory capacity, memory bandwidth, and inference throughput as production LLMs push context windows from thousands to millions of tokens. Efficient KV cache management has thus become a first-order challenge for scalable LLM deployment. This paper provides a systematic review of recent KV cache optimization techniques, organizing them into five principal directions: cache eviction, cache compression, hybrid memory solutions, novel attention mechanisms, and combination strategies. For each category we analyze the underlying mechanisms, deployment trade-offs, and empirical performance across memory reduction, throughput, and model accuracy metrics. We further map techniques to seven practical deployment scenarios, including long-context single requests, high-throughput datacenter serving, edge devices, multi-turn conversations, and accuracy-critical reasoning, providing actionable guidance for practitioners selecting among competing approaches. Our analysis reveals that no single technique dominates across all settings; instead, the optimal strategy depends on context length, hardware constraints, and workload characteristics, pointing toward adaptive, multi-stage optimization pipelines as a promising direction for future research.