TokenPilot: 面向LLM智能体的缓存高效上下文管理框架
TokenPilot: Cache-Efficient Context Management for LLM Agents
想降低LLM智能体长会话的推理成本?看看TokenPilot,它通过智能管理上下文缓存,在三个基准上省了61%-87%的费用,性能还不掉队。
TokenPilot提出了一种双粒度上下文管理框架,通过Ingestion-Aware Compaction稳定提示前缀并消除环境噪声,以及Lifecycle-Aware Eviction监控上下文段残余效用。
在PinchBench和Claw-Eval基准测试中,TokenPilot在孤立模式下分别降低61%和56%的成本,连续模式下降低61%和87%,同时保持与先前系统相当的性能。该框架已集成到LightMem2中,可访问https://github.
com/zjunlp/LightMem2。
TokenPilot: Cache-Efficient Context Management for LLM Agents
As LLM agents are deployed in long-horizon sessions, context accumulation drives up inference costs. Existing approaches utilize text pruning or dynamic memory eviction to minimize token footprints; however, their unconstrained sequence mutations alter layouts, introducing prefix mismatches and cache invalidation. This reveals a critical trade-off between text sparsity and prompt cache continuity. To address this, we present TokenPilot, a dual-granularity context management framework. Globally, Ingestion-Aware Compaction acts as a framework harness to stabilize prompt prefixes and eliminate open-world environmental noise at the ingestion gate. Locally, Lifecycle-Aware Eviction monitors the ongoing residual utility of context segments, enforcing a conservative batch-turn schedule to offload content segments only when task relevance expires. Experiments on PinchBench and Claw-Eval under both isolated and continuous modes demonstrate that TokenPilot reduces costs by 61% and 56% in isolated mode, and 61% and 87% in continuous mode, while maintaining competitive performance compared to prior systems. TokenPilot has been integrated into LightMem2 at https://github.com/zjunlp/LightMem2.
本条情报归属 AITOP「论文」核心追踪栏目。涉及核心实体与技术议题包括:TokenPilot、LightMem2、缓存管理、上下文优化,读者可通过下方标签进入对应专题页查阅历史脉络与关联对比。
信源核验说明:本文原始线索采编自「arXiv cs.LG」(@Buqiang Xu, Zirui Xue, Dianmou Chen, Chenyang Fu, Chiyu Wu, Caiying Huang, Chen Jiang, Jizhan Fang, Xinle Deng, Yijun Chen, Yunzhi Yao, Xuehai Wang, Jin Shang, Gong Yu, Ningyu Zhang),经 AITOP 多维评分管线结构化提炼。