arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.04557cs.CLcs.IRcs.LG
收藏

大规模弹匣:训练模块化KV缓存以处理大型文档集合

Cartridges at Scale: Training Modular KV Caches over Large Document Collections

Amazon AGI(亚马逊人工智能研究院)

Momchil Hardalov, Gonzalo Iglesias, Adrià de Gispert

AI总结:

提出Cartridges at Scale (CAS)框架,通过动态干扰混合和内存高效预算管理器实现大规模多弹匣训练,在减少预填充开销的同时保持准确性,性能优于单块弹匣10-31点,接近全上下文学习。

摘要:

大型语言模型能够处理长上下文,但预填充数百万个标记是浪费的,因为许多内容在查询之间保持不变。弹匣通过将文档集合提炼为可重用的键值(KV)缓存来解决这一问题,从而消除预填充同时保持准确性。这种方法的一个关键限制是弹匣是单块且非组合的:将整个集合编码为单个KV块无法扩展,并且天真地混合单独训练的弹匣会使性能下降到接近随机水平。我们引入了Cartridges at Scale (CAS),这是一个可扩展的多弹匣学习训练框架,具有动态干扰混合和内存高效的预算管理器,可在GPU和持久存储之间轮换数百个每文档弹匣。我们的方法可扩展到超过一百万个标记的集合,在可比标记预算下,比单块弹匣提高10-31点。即使在高度压缩下,Oracle弹匣准确率也接近完全上下文学习的2-6点范围内。当与检索结合用于弹匣选择时,CAS匹配或超过传统RAG准确率,同时消耗的提示标记减少3-4倍。

英文摘要:

Large Language Models can reason over long contexts, yet prefilling millions of tokens is wasteful as much of the content remains static across queries. Cartridges address this by distilling document collections into reusable key-value (KV) caches that eliminate prefilling while preserving accuracy. A critical limitation of this approach is that cartridges are monolithic and non-compositional: encoding an entire collection into a single KV block does not scale, and naively mixing cartridges trained in isolation collapses performance to near chance. We introduce Cartridges at Scale (CAS), a training framework for scalable multi-cartridge learning with dynamic distractor mixing and a memory-efficient budget manager that rotates hundreds of per-document cartridges between GPU and persistent storage. Our approach scales to collections exceeding a million tokens, improving over a monolithic cartridge by 10-31 points at comparable token budgets. Oracle cartridge accuracy falls within 2-6 points of full in-context learning even at high compression. When paired with retrieval for cartridge selection, CAS matches or exceeds conventional RAG accuracy while consuming 3-4x fewer prompt tokens.

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

↑