In plain words: The model reads text in chunks and passes a small memory of key facts between them, so computing cost grows steadily instead of exploding with length. It recalled facts across up to two million tokens, and language prediction improved as more chunks were read.
Abstract
A major limitation for the broader scope of problems solvable by transformers is the quadratic scaling of computational complexity with input size. In this study, we investigate the recurrent memory augmentation of pre-trained transformer models to extend input context length while linearly scaling compute. Our approach demonstrates the capability to store information in memory for sequences of up to an unprecedented two million tokens while maintaining high retrieval accuracy. Experiments with language modeling tasks show perplexity improvement as the number of processed input segments increases. These results underscore the effectiveness of our method, which has significant potential to enhance long-term dependency handling in natural language understanding and generation tasks, as well as enable large-scale context processing for memory-intensive applications.
Aydar Bulatov, Yuri Kuratov, Yermek Kapushev, Mikhail S. Burtsev
arXiv:2304.11062 · cs.CL, cs.AI, cs.LG · submitted Apr 19, 2023 · updated Feb 6, 2024
abstract · pdf · html
We already know Large Language Models (LLMs) can learn at runtime (ie, separately to the training process.) This is called "In Context Learning". See [1], [2] for more details. (BTW, when anyone says "LLMs are stochastic parrots" you know they are ignorant of this)
In context learning is wonderful because it means you can "train" a LLM at run time by filling the context with examples. Traditionally this "context window" has been a few thousand tokens, and GPT-4 recently extended that to 32,000 tokens.
That is useful, but if you wanted to say load all of a companies documents and ask questions it doesn't really work because this overflows the context.
But at 2M tokens there's a whole range of applications that become possible.
[1] Language Models are Few-Shot Learners: https://arxiv.org/abs/2005.14165
[2] Language Models Secretly Perform Gradient Descent as Meta-Optimizers: https://arxiv.org/abs/2212.10559