about
Leave No Context Behind: Efficient Infinite Context Transformers (arxiv.org)
3 points by sethbannon on Apr 12, 2024 | hide | past | pdf | discuss on HN

In plain words: Instead of re-reading the whole input each time, each step keeps short-range reading plus a compact memory of older text, so memory stays small as input grows without end. It still found a hidden key in a million-token input and summarized long books.

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

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.

Tsendsuren Munkhdalai, Manaal Faruqui, Siddharth Gopal
arXiv:2404.07143 · cs.CL, cs.AI, cs.LG, cs.NE · submitted Apr 10, 2024 · updated Aug 9, 2024
abstract · pdf · html · 9 pages, 4 figures, 4 tables (v2 adds: background, implementation details, recent citations and acknowledgments)

add comment on HN
Also discussed: Apr 2024 (39 points, 4 comments) · Apr 2024 (4 points, 0 comments)