arXiv:2606.09659cs.CLcs.AI2026-06

提出高效长文本压缩模型,显著降低推理内存占用。

End-to-End Context Compression at Scale

论文配图:End-to-End Context Compression at Scale
图 1 · 摘自论文原文
  • 用编码器-解码器结构将长文本压缩为短向量,减少内存消耗。
  • 在3500亿词上预训练,实现1:4至1:16压缩比,保持高精度。
  • 适合需要处理超长上下文的智能体系统,支持按需展开片段。

长上下文语言模型推理受限于内存,因键值缓存(KV cache)随上下文长度增长而增大。现有压缩方法要么严重降低模型质量,要么压缩耗时耗算力;且多数要求输入适配目标模型上下文窗口,与现代生产级推理引擎不兼容。编码器-解码器压缩器虽具理论优势,但实际性能未达键值缓存压缩水平。本文重新审视该方向,通过架构搜索并从零开始预训练多种变体,确定最优设计。基于此,我们持续预训练一系列0.6B编码器、4B解码器模型,每组在超过3500亿词数据上训练,支持1:4、1:8、1:16三种压缩比。提出潜变量上下文语言模型(LCLMs),在通用任务表现、压缩速度和峰值内存使用上均实现更优权衡。实验证明,LCLMs可作为长时序智能体的高效核心,使智能体能快速扫描压缩后的长上下文,并按需自适应展开相关段落。

原文摘要 · Abstract (English)

Long-context language model inference is bottlenecked by memory, as the KV cache grows with context length. Recent techniques to compress the KV cache fall short: they either degrade model quality substantially or require considerable time and compute to compress a single long prompt. Furthermore, many methods require the input to fit within the target model's context window, and are generally incompatible with modern production inference engines. Encoder-decoder compressors, which map a long token sequence to a shorter sequence of latent embeddings consumed by a decoder, are an appealing alternative in principle. However, existing approaches are not competitive with KV cache compression on the accuracy-efficiency frontier. In this work, we revisit encoder-decoder compression and close this gap. We first perform an architecture search, pre-training many variants from scratch to determine how best to design and train encoder-decoder compressors. Guided by our findings, we continually pre-train a family of 0.6B-encoder, 4B-decoder models on over 350B tokens each, at compression ratios of 1:4, 1:8, and 1:16. We introduce Latent Context Language Models (LCLMs), a family of compressors that improve the Pareto frontier across general-task performance, compression speed, and peak memory usage. We demonstrate that LCLMs serve as efficient backbones for long-horizon agents, letting the agent skim through a compressed long context and adaptively expand relevant segments on demand.

长文本压缩上下文压缩推理优化智能体系统

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。