跳到正文
arXiv cs.CL· Marc Serra Ortega, Andrey Barsky, Carlos Boned Riera, Tom\'as Ockier, Dimosthenis Karatzas·· 12 小时前AI 评分38

Boa Compressor:基于 Mamba 状态空间模型的线性时间上下文压缩

Linear-Time Context Compression with State-Space Encoding

AI 导读

Boa Compressor 是一个基于 Mamba 状态空间模型(SSM)的即插即用在线上下文压缩器,单次线性时间编码任意长度上下文,为冻结的目标 LLM 提供压缩表示。它通过知识蒸馏训练,在相同压缩比下性能匹配或超越现有 SOTA 离线压缩基线,速度比 Transformer 实现快一个数量级。Boa 可扩展至更长上下文和高达 16x 的压缩比,使每次推理查询都能低成本压缩。

正文

View PDF HTML (experimental)

Abstract:Transformer-based large language models (LLMs) impose substantial computation and memory costs as context sizes increase, motivating methods that compress a context into a shorter representation before inference. Existing soft-prompt compression methods typically use the same Transformer backbone as used in the target model, where producing the compressed representation leads to significant latency overheads. This restricts them to the offline setting where context is compressed once and then reused across many queries. We propose the Boa Compressor, a plug-and-play online context compressor built on a Mamba state-space model (SSM) that encodes arbitrary-length context in a single linear-time pass, producing a representation on which we condition a frozen target LLM. The SSM is trained by distillation, matching the next-token logit distribution from the LLM ingesting the full context (as teacher) to the same LLM ingesting the compressed representation (as the student). At equal compression ratios, Boa matches or surpasses the performance of existing state-of-the-art offline compression baselines, while being an order of magnitude faster than Transformer-based implementations, thereby reducing end-to-end latency rather than adding compression time overhead. We demonstrate that Boa also scales well to longer contexts and to compression ratios as aggressive as 16x. By enabling effective compression that is cheap enough to run on every query at inference time, Boa becomes a practical and general tool for efficient long-context inference.
Comments: 15 pages, 7 figures
Subjects: Computation and Language (cs.CL); Machine Learning (cs.LG)
Cite as: arXiv:2610.33006 [cs.CL]
  (or arXiv:2610.33006v1 [cs.CL] for this version)
  https://doi.org/10.48550/arXiv.2610.33006

arXiv-issued DOI via DataCite

Submission history

From: Marc Serra Ortega [view email]
[v1] Wed, 7 Oct 2026 14:48:36 UTC (2,493 KB)

来源:arXiv cs.CL · arxiv.org