Linear-Time Context Compression with State-Space Encoding
On the map: Efficient LLM inference and serving → Prompt and context compression
Abstract (arXiv)
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.
Key facts. No citing papers in the map yet (data through 26 Nov 2026). Placed in Prompt and context compression, one of 12 directions in Efficient LLM inference and serving. Builds on 24 of its 27 references that are in the map. Submitted 7 Oct 2026.
Builds on
24 of 27 references.
Closest ancestors · 6
Same direction, newest first
- 2025Autoencoding-Free Context Compression for LLMs via Contextual Semantic Anchors10 Oct
- 2024Recurrent Context Compression: Efficiently Expanding the Context Window of LLM10 Jun
- 2024xRAG: Extreme Context Compression for Retrieval-augmented Generation with One Token22 May
- 2024Long Context Compression with Activation Beacon7 Jan
- 2023In-context Autoencoder for Context Compression in a Large Language Model13 Jul
- 2022Prompt Compression and Contrastive Conditioning for Controllability and Toxicity Reduction in Language Models6 Oct
Other references · 18
- 2015Distilling the Knowledge in a Neural Networkcited by 10,968
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 5,111
- 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Dualitycited by 1,480
- 2024The FineWeb Datasets: Decanting the Web for the Finest Text Data at Scalecited by 1,357
- 2021A Dataset of Information-Seeking Questions and Answers Anchored in Research Paperscited by 527
- 2023Learning to Compress Prompts with Gist Tokenscited by 426
- 2023Adapting Language Models to Compress Contextscited by 390
- 2021Efficient Attentions for Long Document Summarizationcited by 368
- 2023LLMLingua: Compressing Prompts for Accelerated Inference of Large Language Modelscited by 324
- 2023LongLoRA: Efficient Fine-tuning of Long-Context Large Language Modelscited by 274
- 2024Repeat After Me: Transformers are Better than State Space Models at Copyingcited by 245
- 2023Zoology: Measuring and Improving Recall in Efficient Language Modelscited by 236
6 more
- 2024An Empirical Study of Mamba-based Language Modelscited by 209
- 2023Compressing Context to Enhance Inference Efficiency of Large Language Modelscited by 208
- 2019MRQA 2019 Shared Task: Evaluating Generalization in Reading Comprehensioncited by 191
- 2021BookSum: A Collection of Datasets for Long-form Narrative Summarizationcited by 188
- 2022Learning by Distilling Contextcited by 180
- 2025REFRAG: Rethinking RAG based Decodingcited by 13
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026End-to-End Context Compression at Scale
- 2024Enhancing and Accelerating Large Language Models via Instruction-Aware Contextual Compression
- 2024In-Context Former: Lightning-fast Compressing Context for Large Language Model
- 2023Dodo: Dynamic Contextual Compression for Decoder-only LMs
- 2023The Cost of Compression: Investigating the Impact of Compression on Parametric Knowledge in Language Models
- 2026FlexComp: One Model for Every Ratio in Context Compression
- 2024KV Cache Compression, But What Must We Give in Return? A Comprehensive Benchmark of Long Context Capable Approaches
- 2024Characterizing Prompt Compression Methods for Long Context Inference