arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2603.20397cs.LGcs.AI
收藏

用于可扩展和高效大语言模型推理的键值缓存优化策略

KV Cache Optimization Strategies for Scalable and Efficient LLM Inference

Dell Technologies(戴尔技术)

Yichun Xu, Navjot K. Khaira, Tejinder Singh

AI总结:

本文系统回顾了键值缓存优化技术,探讨了缓存淘汰、压缩、混合内存方案等五个方向,分析了不同场景下的性能和部署权衡,指出适应性多阶段优化流程是未来研究方向。

摘要:

键值缓存是Transformer架构大语言模型中的关键优化,通过消除自回归生成中重复计算的过去token表示。然而,其内存占用与上下文长度线性增长,限制了GPU内存容量、内存带宽和推理吞吐量,尤其当生产LLM的上下文窗口从数千扩展到数百万token时。本文系统回顾了最近的键值缓存优化技术,将其分为五个主要方向:缓存淘汰、缓存压缩、混合内存方案、新型注意力机制和组合策略。针对每个类别,我们分析了其底层机制、部署权衡以及在内存减少、吞吐量和模型准确性指标上的实证性能。我们进一步将技术映射到七个实际部署场景,包括长上下文单请求、高吞吐量数据中心服务、边缘设备、多轮对话和准确性关键推理,为从业者选择竞争性方法提供可行指导。我们的分析表明,没有单一技术在所有设置中占据主导地位;相反,最佳策略取决于上下文长度、硬件限制和工作负载特征,指向适应性、多阶段优化流程作为未来研究的有前途方向。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑