arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.03067cs.LGcs.AI
收藏

KV缓存块的联合编码以实现可扩展的LLM服务

Joint Encoding of KV-Cache Blocks for Scalable LLM Serving

Distributed and Parallel Software Lab(分布式并行软件实验室);Huawei Technologies(华为技术)

Joseph Kampeas, Emir Haleva

AI总结:

通过联合编码KV缓存块,实现高并发LLM服务,提升吞吐量并减少内存消耗。

摘要:

现代大型语言模型(LLMs)驱动交互式AI系统,但关键值(KV)缓存的内存密集型增长限制了并发负载下的实时吞吐量。现有的KV缓存压缩方法依赖于刚性的启发式方法,破坏张量布局,或需要专用计算,从而限制了可扩展性和部署。我们提出了KV缓存块的联合编码,将跨请求和输入块的相似块融合到共享表示中,同时保持标准缓存结构。这缓解了KV缓存的内存瓶颈,支持高并发服务而无需专用硬件。理论上,我们分析了在泊松过程模型下融合缓存块的率-失真权衡。经验上,我们的方法在各种LLM和基准测试中实现了高达4.38倍的KV缓存压缩,精度损失可忽略不计,优于最近的结构化和自适应压缩基线。在实际的LLM服务中,联合编码在单机vLLM基准测试中将token吞吐量提高了约40%,展示了显著的推理吞吐量提升。代码可在https://github.com/sef1/kv_fast_fusion kv_joint_encoding中获得。

英文摘要:

Modern large language models (LLMs) drive interactive AI systems but are bottlenecked by the memory-heavy growth of key-value (KV) caches, which limits real-time throughput under concurrent loads. Existing KV-cache compression methods rely on rigid heuristics, disrupt tensor layouts, or require specialized compute, hindering scalability and deployment. We propose joint encoding of KV-cache blocks, which fuses similar blocks across requests and input chunks into shared representations while preserving standard cache structure. This alleviates the KV-cache memory bottleneck, supporting high-concurrency serving without specialized hardware. Theoretically, we analyze the rate-distortion tradeoff of fused cache blocks under a Poisson process model. Empirically, our method achieves up to 4.38 $\times$ KV-cache compression with negligible accuracy loss across diverse LLMs and benchmarks, outperforming recent structured and adaptive compression baselines. In real LLM serving, joint encoding improves the token throughput by $\sim$40\% on a single-machine vLLM benchmark, demonstrating substantial gains in inference throughput. Code is available at https://github.com/sef1/kv_fast_fusion kv_joint_encoding.

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

↑