arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.09735cs.ARcs.AIcs.DCcs.OS
收藏

KV-RM:为静态图LLM服务正则化KV缓存移动

KV-RM: Regularizing KV-Cache Movement for Static-Graph LLM Serving

Stevens Institute of Technology(史蒂文斯理工学院);The Hong Kong University of Science and Technology (Guangzhou)(香港科学与技术大学(广州));Argonne National Laboratory(阿贡国家实验室);Northwestern University(西北大学)

Zhiqing Zhong, Zhijing Ye, Jian Zhang, Weijian Zheng, Bolun Sun, Xiaodong Yu

AI总结:

本文提出KV-RM,通过正则化KV缓存移动提升静态图LLM服务的灵活性,减少内存占用并降低延迟峰值。

摘要:

静态图LLM解码器提供可预测的启动、固定张量形状和低提交开销,但在线解码暴露了高度不规则的KV缓存行为:请求长度不同,EOS事件异步到达,逻辑历史随时间碎片化。动态运行时通过分页的KV管理和步骤级调度恢复灵活性,而静态图执行器常过度预留内存并遭受突发时间延迟异常。本文研究是否可以将大部分这种变异性在固定解码接口下吸收。我们提出了KV-RM,一种运行时设计,旨在在静态图LLM解码器下正则化KV缓存移动。KV-RM将逻辑KV历史与物理存储解耦,通过块分页器跟踪活跃的KV状态,并通过单个提交描述符实现每个解码步骤的材料化。一个合并阶段的传输路径将非连续的KV映射合并为少量大的传输组,再由固定形状的注意力内核消耗。可选的有界远历史摘要可在相同接口下启用,但核心设计不依赖它们。在2个GPU NVIDIA A100节点上,KV-RM相比静态图基线提升了混合长度解码吞吐量和尾部延迟,减少了跨工作负载家族的预留KV内存,并在生产跟踪回放中消除了严重的突发时间延迟峰值。这些结果表明,KV缓存移动,而非内核形状,可以成为恢复静态图LLM服务运行时灵活性的有效边界。

英文摘要:

Static-graph LLM decoders provide predictable launches, fixed tensor shapes, and low submission overhead, but online decoding exposes highly irregular KV-cache behavior: request lengths differ, EOS events arrive asynchronously, and logical histories fragment over time. Dynamic runtimes recover flexibility through paged KV management and step-level scheduling, while static-graph executors often over-reserve memory and suffer burst-time latency outliers. This paper studies whether much of this variability can be absorbed below a fixed decode interface. We present KV-RM, a runtime design that regularizes KV-cache movement beneath a static-graph LLM decoder. KV-RM decouples logical KV histories from physical storage, tracks active KV state through a block pager, and materializes each decode step through a single committed descriptor. A merge-staged transport path coalesces non-contiguous KV mappings into a small number of large transfer groups before a fixed-shape attention kernel consumes them. Optional bounded far-history summaries can be enabled under the same interface, but the core design does not depend on them. On a 2-GPU NVIDIA A100 node, KV-RM improves mixed-length decoding throughput and tail latency relative to a static-graph baseline, reduces reserved KV memory across workload families, and removes severe burst-time latency spikes under production-trace replay. These results suggest that KV-cache movement, rather than kernel shape, can be an effective boundary for recovering runtime flexibility in static-graph LLM serving.

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

↑