# Leave No Context Behind: Efficient Infinite Context Transformers with Infini-attention

- **ID:** 564
- **Kind:** paper
- **URL:** https://arxiv.org/abs/2404.07143
- **Authors:** Tsendsuren Munkhdalai, Manaal Faruqui, Siddharth Gopal
- **Venue:** arXiv / Google
- **Published:** 2024
- **Tags:** infini-attention, long-context, compressive-memory, google, passkey, booksum
- **Topics:** long context, compressive memory, linear attention
- **Added:** 2026-10-01
- **Research status:** done
- **Page:** https://papers.projxon.ai/entries/564

## Summary

Infini-attention keeps local softmax attention plus a compressive associative memory updated from the same QKV (linear or delta rule) and a learned gate β. 114× smaller memory than a 65k Memorizing Transformer; PG19 PPL 9.65 vs 11.37. A 1B model solves 1M passkey after 5k-length FT; 8B BookSum 500k SOTA Rouge overall 18.5. No official code on abs.

## Attributes

- **Purpose:** Give Transformers unbounded context with bounded memory by compressing old KV into linear attention
- **Scale:** 12L/8H d=128 LM on PG19 and Arxiv-math, segment 2048 / train 32k (also 100k); 1B passkey 32k–1M; 8B BookSum FT 32k eval 500k
- **Time period:** 2024-04-10 (arXiv 2404.07143 v1); last revised 2024-08-09 (v2). Comment: 9 pages, 4 figures, 4 tables. HF paper publishedAt 2024-04-10.

## From the source (fetched 2026-10-03)

- **Published:** Apr 10, 2024 (arXiv)
- **Last revised:** Aug 9, 2024 (arXiv)
- **arXiv categories:** cs.CL, cs.AI, cs.LG, cs.NE (arXiv)
- **Author comment:** 9 pages, 4 figures, 4 tables (v2 adds: background, implementation details, recent citations and acknowledgments) (arXiv)
- **Citations:** 243 (12 influential) (Semantic Scholar)
- **References:** 64 (Semantic Scholar)

## Abstract

This work introduces an efficient method to scale Transformer-based Large Language Models (LLMs) to infinitely long inputs with bounded memory and computation. A key component in our proposed approach is a new attention technique dubbed Infini-attention. The Infini-attention incorporates a compressive memory into the vanilla attention mechanism and builds in both masked local attention and long-term linear attention mechanisms in a single Transformer block. We demonstrate the effectiveness of our approach on long-context language modeling benchmarks, 1M sequence length passkey context block retrieval and 500K length book summarization tasks with 1B and 8B LLMs. Our approach introduces minimal bounded memory parameters and enables fast streaming inference for LLMs.

## Research notes

- Primary: arxiv abs (cs.CL; also cs.AI, cs.LG, cs.NE). License: arXiv.org perpetual non-exclusive on HTML at check. Comment: 9 pages, 4 figures, 4 tables (v2 adds background, implementation details, recent citations and acknowledgments). Google; correspondence tsendsuren@google.com. No official code on abs. HF paper page 111 upvotes; unofficial linked model mustafaaljadery/gemma-2B-10M not copied into hf_* fields. Discord posted HTML. Uses public PG19/Arxiv-math/BookSum rather than a new hosted corpus, so no datasets_local row. License field left blank per catalog convention.

## Cited by, within this collection

- [Memory Caching: RNNs with Growing Memory](https://papers.projxon.ai/entries/461) (paper 2026, #461)
- [Titans: Learning to Memorize at Test Time](https://papers.projxon.ai/entries/550) (paper 2025, #550)

## Related entries

- Discussed in: [Long context: three bets and a weak spot in evaluation (overview)](https://papers.projxon.ai/entries/1208) (note, #1208)

## Similar entries

- [Triadic Linear Attention: Three-Dimensional Recurrent States for Long-Context Sequence Modeling](https://papers.projxon.ai/entries/1244) (paper, #1244)
- [MoBA: Mixture of Block Attention for Long-Context LLMs](https://papers.projxon.ai/entries/707) (paper, #707)
- [Balancing Memory Pathways: Analyzing and Improving Memory Utilization in Hybrid LMs](https://papers.projxon.ai/entries/1282) (paper, #1282)
- [Dynamic Linear Attention](https://papers.projxon.ai/entries/489) (paper, #489)
- [Block Sparse Attention with Log-Linear Complexity](https://papers.projxon.ai/entries/1086) (paper, #1086)
- [LongHarness Bench: Stress-Testing Language Model Harnesses for Long-Context Reasoning](https://papers.projxon.ai/entries/821) (paper, #821)
