Context Compression for Auto-regressive Transformers with Sentinel Tokens
On the map: Efficient LLM inference and serving → Prompt and context compression
Abstract (arXiv)
The quadratic complexity of the attention module makes it gradually become the bulk of compute in Transformer-based LLMs during generation. Moreover, the excessive key-value cache that arises when dealing with long inputs also brings severe issues on memory footprint and inference latency. In this work, we propose a plug-and-play approach that is able to incrementally compress the intermediate activation of a specified span of tokens into compact ones, thereby reducing both memory and computational cost when processing subsequent context. Experiments on both in-domain language modeling and zero-shot open-ended document generation demonstrate the advantage of our approach over sparse attention baselines in terms of fluency, n-gram matching, and semantic similarity. At last, we comprehensively profile the benefit of context compression on improving the system throughout. Code is available at https://github.com/DRSY/KV_Compression.
Key facts. Cited by 8 papers in the map (data through 7 Oct 2026). Placed in Prompt and context compression, one of 12 directions in Efficient LLM inference and serving. Builds on 20 of its 26 references that are in the map. First posted on arXiv 12 Oct 2023.
Builds on
20 of 26 references.
References · 20
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2019BERTScore: Evaluating Text Generation with BERTcited by 5,462
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
- 2022OPT: Open Pre-trained Transformer Language Modelscited by 3,464
- 2020Longformer: The Long-Document Transformercited by 3,362
- 2016Pointer Sentinel Mixture Modelscited by 2,992
- 2019The Curious Case of Neural Text Degenerationcited by 2,881
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
8 more
- 2023Pythia: A Suite for Analyzing Large Language Models Across Training and Scalingcited by 1,734
- 2017Decoupled Weight Decay Regularizationcited by 1,722
- 2020Big Bird: Transformers for Longer Sequencescited by 1,673
- 2020Reformer: The Efficient Transformercited by 1,658
- 2019Generating Long Sequences with Sparse Transformerscited by 1,523
- 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,307
- 2018Hierarchical Neural Story Generationcited by 1,182
- 2023Learning to Compress Prompts with Gist Tokenscited by 379
Built on by
Citing papers per year: 2024: 8.
8 papers.
- 2024Layer-Condensed KV Cache for Efficient Inference of Large Language Modelscited by 58
- 2024Learning to Compress Prompt in Natural Language Formatscited by 54
- 2024500xCompressor: Generalized Prompt Compression for Large Language Modelscited by 45
- 2024Selective Attention Improves Transformercited by 26
- 2024Recurrent Context Compression: Efficiently Expanding the Context Window of LLMcited by 7
- 2024Efficient Sparse Attention needs Adaptive Token Releasecited by 4
- 2024Taking a Deep Breath: Enhancing Language Modeling of Large Language Models with Sentinel Tokenscited by 2
- 2024FlashBack: Efficient Retrieval-Augmented Language Modeling for Fast Inferencecited by 1
- 2024Selective Attention Improves Transformer3 Oct 2024
- 2024500xCompressor: Generalized Prompt Compression for Large Language Models6 Aug 2024
- 2024Efficient Sparse Attention needs Adaptive Token Release2 Jul 2024
- 2024Taking a Deep Breath: Enhancing Language Modeling of Large Language Models with Sentinel Tokens16 Jun 2024
- 2024Recurrent Context Compression: Efficiently Expanding the Context Window of LLM10 Jun 2024
- 2024Layer-Condensed KV Cache for Efficient Inference of Large Language Models17 May 2024
- 2024FlashBack: Efficient Retrieval-Augmented Language Modeling for Fast Inference7 May 2024
- 2024Learning to Compress Prompt in Natural Language Formats28 Feb 2024
Similar, not cited
Close in wording, no citation either way
- 2025Compress, Gather, and Recompute: REFORMing Long-Context Processing in Transformers
- 2024Long Context Compression with Activation Beacon
- 2025Lossless Token Sequence Compression via Meta-Tokens
- 2025KV-Distill: Nearly Lossless Learnable Context Compression for LLMs
- 2025Context Cascade Compression: Exploring the Upper Limits of Text Compression
- 2024KV Cache Compression, But What Must We Give in Return? A Comprehensive Benchmark of Long Context Capable Approaches
- 2026Training Transformers for KV Cache Compressibility
- 2025SCOUT: Toward Sub-Quadratic Attention via Segment Compression for Optimized Utility in Transformers