KVCMAS:多智能体系统中共享上下文的高效KV缓存校正
研究论文 · 2026/09/29
KVCMAS 是一个在线 KV 缓存校正框架,用于提示特化的多智能体系统。它使用紧凑的低秩状态表示跨智能体的缓存偏差,并在智能体工作流中无缝链接校正,无需额外的参考预填充。该设计支持动态变化的共享上下文,同时保留精确的首个智能体缓存。在多种语言和视觉语言工作负载中,KVCMAS 在高度并发服务下实现了最低的 TTFT,同时匹配或提高了先前 KV 缓存共享方法的准确性。在受控服务轨迹下,它比无 KV 缓存共享的推理提供了 2.0 倍的 TTFT 加速,并将峰值 GPU 内存相对于先前的 KV 缓存校正方法减少了高达 3.7 倍。
KVCMAS 解决了多智能体系统中 KV 缓存共享的冗余和内存开销问题,通过在线校正实现高效推理,在保持准确性的同时显著提升并发服务性能并降低内存占用,对多智能体部署具有实用价值。
Prompt-specialized multi-agent systems enable multiple agents to share a model while performing complementary roles to solve complex tasks. However, agent-specific prefixes change the KV cache generated for the same shared context, causing each agent to repeatedly prefill the growing context and construct a separate cache with high computation and memory overhead. Selective recomputation reduces this redundancy but still retains substantial model execution, while existing delta correction methods either support only recurring context relations or maintain memory-intensive online correction states for dynamically changing context. For first seen shared context, these methods also construct a reference cache outside the agent workflow, and an approximate correction at the first agent affects the outputs passed to subsequent agents. We present KVCMAS, an online KV cache correction framework that represents cross-agent cache deviations using compact low-rank states and seamlessly chains corrections along the agent workflow without an additional reference prefill. This design supports dynamically changing shared context while preserving an exact first-agent cache. Across multiple language and vision-language workloads, KVCMAS matches or improves the accuracy of prior KV cache sharing methods while achieving the lowest TTFT under highly concurrent serving. Under controlled serving traces, it provides a 2.0x TTFT speedup over inference without KV cache sharing and reduces peak GPU memory by up to 3.7x relative to a prior KV cache correction method. These results establish KVCMAS as an accurate and scalable KV cache sharing approach for prompt-specialized multi-agent serving.