Kein Kontext zurücklassen: Effiziente Infinite Context Transformer mit Infini-Aufmerksamkeit.
Leave No Context Behind: Efficient Infinite Context Transformers with Infini-attention
April 10, 2024
Autoren: Tsendsuren Munkhdalai, Manaal Faruqui, Siddharth Gopal
cs.AI
Zusammenfassung
Diese Arbeit stellt eine effiziente Methode vor, um Transformer-basierte Large Language Models (LLMs) auf unendlich lange Eingaben mit begrenztem Speicher und Rechenleistung zu skalieren. Ein Schlüsselelement unseres vorgeschlagenen Ansatzes ist eine neue Aufmerksamkeitstechnik namens Infini-Attention. Die Infini-Attention integriert einen komprimierten Speicher in den herkömmlichen Aufmerksamkeitsmechanismus und implementiert sowohl maskierte lokale Aufmerksamkeit als auch langfristige lineare Aufmerksamkeitsmechanismen in einem einzigen Transformer-Block. Wir zeigen die Wirksamkeit unseres Ansatzes anhand von Langkontext-Sprachmodellierungs-Benchmarks, 1M-Sequenzlänge Passkey-Kontextblockabruf und 500K-Länge Buchzusammenfassungsaufgaben mit 1B- und 8B-LLMs. Unser Ansatz führt minimale begrenzte Speicherparameter ein und ermöglicht schnelle Streaming-Inferenz für LLMs.
English
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.Summary
AI-Generated Summary