面向异构多智能体LLM的无预填充跨家族KV缓存传输

·

研究论文 · 2026/10/02

近期多智能体LLM系统越来越多地结合异构模型以承担专门角色。然而,基于文本的通信要求每个接收方对发送方已处理的共享上下文进行预填充。复用发送方的键值(KV)缓存可避免这种冗余,但跨模型族的无预填充传输必须处理分词、模型深度和KV表示的差异。为此,我们提出HeteroFold,一种无预填充的跨模型族KV缓存传输方法,保持发送方和接收方均冻结。HeteroFold对齐模型结构,将发送方缓存映射到接收方空间,并校准以保持接收方行为。在六个传输方向上,HeteroFold在四个长上下文基准和大多数短上下文设置上取得了最佳的缓存传输性能。在多智能体基准上也与基于文本的通信相当。在32K上下文长度下,Llama-3.1-8B到Ministral-3-14B的传输比原生预填充快10.7倍,比最先进的无预填充基线Dense Latent和KV Ridge快1.18-1.47倍。这些结果表明,HeteroFold无需接收方预填充即可实现高效的跨模型族KV复用。

该研究解决了异构多智能体LLM系统中跨模型族KV缓存复用的关键挑战,无需接收方预填充即可显著提升效率,同时保持性能,对多智能体系统的实际部署具有重要价值。

Recent multi-agent LLM systems increasingly combine heterogeneous models for specialized agent roles. However, text-based communication requires each receiver to prefill shared context already processed by the sender. Reusing the sender's key-value (KV) cache avoids this redundancy, but prefill-free transfer across model families must handle differences in tokenization, model depth, and KV representations. To address these issues, we propose HeteroFold, a prefill-free cross-family KV cache transfer method that keeps both the sender and receiver frozen. HeteroFold aligns model structures, maps the sender cache into the receiver space, and calibrates it to preserve receiver behavior. Across six transfer directions, HeteroFold achieves the best cache-transfer performance on all four long-context benchmarks and most short-context settings. It also matches text-based communication on the multi-agent benchmark. At 32K context length, Llama-3.1-8BrightarrowMinistral-3-14B transfer is 10.7times faster than Native Prefill and 1.18--1.47times faster than the state-of-the-art prefill-free baselines, Dense Latent and KV Ridge. These results show that HeteroFold enables efficient cross-family KV reuse without receiver prefill.

阅读原文

参与讨论