\infty-former: Infinite Memory Transformer
Transformers are unable to model long-term memories effectively, since the amount of computation they need to perform grows with the context length. While variations of efficient transformers have been proposed, they all have a finite memory capacity and are forced to drop old information. In this paper, we propose the \infty-former, which extends the vanilla transformer with an unbounded long-term memory. By making use of a continuous-space attention mechanism to attend over the long-term memory, the \infty-former’s attention complexity becomes independent of the context length, trading off memory length with precision.In order to control where precision is more important, \infty-former maintains “sticky memories,” being able to model arbitrarily long contexts while keeping the computation budget fixed.Experiments on a synthetic sorting task, language modeling, and document grounded dialogue generation demonstrate the \infty-former’s ability to retain information from long sequences.
Code (1)
Tasks
Dialogue GenerationLanguage ModelingLanguage ModellingSimilar Papers 제목 키워드 기반
$\infty$-former: Infinite Memory Transformer
Transformers are unable to model long-term memories effectively, since the amount of computation they need to perform grows with the context length. While variations of efficient transformers have been proposed, they all…
Dialogue GenerationLanguage ModelingLanguage ModellingSLAMFormer-$\infty$: Infinite SLAM Transformer for Unbounded Frontend and Backend Processing
We introduce the Infinite SLAM Transformer (SLAMFormer-$\infty$), the first geometric transformer capable of supporting both long-range frontend and backend processing without an explicit distance bound. Instead of relyi…
EdgeInfinite: A Memory-Efficient Infinite-Context Transformer for Edge Devices
Transformer-based large language models (LLMs) encounter challenges in processing long sequences on edge devices due to the quadratic complexity of attention mechanisms and growing memory demands from Key-Value (KV) cach…
Understanding Transformer from the Perspective of Associative Memory
In this paper, we share our reflections and insights on understanding Transformer architectures through the lens of associative memory--a classic psychological concept inspired by human cognition. We start with the basic…
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 …
Book summarizationLanguage ModelingLanguage ModellingRetrieval