arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.18586cs.DC
收藏

TokenCake: 一种面向基于LLM的多智能体应用的KV缓存中心化服务框架

TokenCake: A KV-Cache-centric Serving Framework for LLM-based Multi-Agent Applications

Peking University(北京大学);Alibaba Group(阿里巴巴集团)

Zhuohang Bian, Feiyang Wu, Zhuoran Li, Teng Ma, Youwei Zhuo

AI总结:

本文提出TokenCake,一种面向基于LLM的多智能体应用的KV缓存中心化服务框架,通过智能体感知设计共同优化调度和内存管理,以解决KV缓存中的空间竞争和时间利用率问题,实验表明其显著降低了端到端延迟并提高了GPU内存利用率。

摘要:

大型语言模型(LLMs)越来越多地部署在复杂的多智能体应用中,这些应用依赖于外部函数调用。这种工作负载对KV缓存造成了严重的性能挑战:空间竞争导致关键智能体的缓存被驱逐,时间利用率不足使智能体的缓存在长时间运行的函数调用中空闲在GPU内存中。我们提出了TokenCake,一种以KV缓存为中心的服务框架,通过智能体感知设计共同优化调度和内存管理,从而填补这一空白。TokenCake的时序调度器采用事件驱动、机会性策略,在函数调用期间主动卸载空闲的KV缓存,并利用预测上传来隐藏数据传输延迟。TokenCake的空间调度器使用动态内存分区,由结合图结构和运行时状态的混合优先级指标引导,以为关键路径智能体保留GPU内存。我们在具有代表性的多智能体基准上评估了TokenCake,结果表明,与vLLM相比,TokenCake将端到端延迟减少了超过47.06%,并提高了有效GPU内存利用率高达16.9%。

英文摘要:

Large Language Models (LLMs) are increasingly deployed in complex multi-agent applications that rely on external function calls. This workload creates severe performance challenges for the KV Cache: spatial contention leads to the eviction of critical agents' caches and temporal underutilization leaves the cache of agents stalled on long-running function calls idling in GPU memory. We present TokenCake, a KV-Cache-centric serving framework that bridges this gap by co-optimizing scheduling and memory management through an agent-aware design. TokenCake's Temporal Scheduler employs an event-driven, opportunistic policy to proactively offload idle KV Caches during function calls and uses predictive uploading to hide data transfer latency. TokenCake's Spatial Scheduler uses dynamic memory partitioning, guided by a hybrid priority metric combining graph structure and runtime state, to reserve GPU memory for critical-path agents. Our evaluation on representative multi-agent benchmarks shows that TokenCake reduces end-to-end latency by up to 47.06% in memory-constrained settings and improves effective GPU utilization by 16.9 percentage points compared to vLLM. TokenCake is publicly available at https://github.com/pkulemonade/TokenCake.

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

↑