Laat geen context achter: Efficiënte Transformers met oneindige context door middel van Infini-attention
Leave No Context Behind: Efficient Infinite Context Transformers with Infini-attention
April 10, 2024
Auteurs: Tsendsuren Munkhdalai, Manaal Faruqui, Siddharth Gopal
cs.AI
Samenvatting
Dit werk introduceert een efficiënte methode om Transformer-gebaseerde Large Language Models (LLMs) te schalen naar oneindig lange inputs met begrensde geheugen- en rekenkosten. Een belangrijk onderdeel van onze voorgestelde aanpak is een nieuwe aandachtstechniek genaamd Infini-attention. De Infini-attention integreert een compressief geheugen in het standaard aandachtmechanisme en combineert zowel gemaskeerde lokale aandacht als langetermijn lineaire aandachtmechanismen in een enkele Transformer-blok. We demonstreren de effectiviteit van onze aanpak op benchmarks voor lange-context taalmodellering, 1M sequentielengte passkey contextblokretrieval en 500K lengte boek samenvattingstaken met 1B en 8B LLMs. Onze aanpak introduceert minimale begrensde geheugenparameters en maakt snelle streaming inferentie mogelijk voor 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.