Information needs to be compressed into latent space or it becomes computationally intractable
> TTT, cannon layers, and titans
But this might be very different from what people expect from "memory" - i.e. ability to learn vast amounts of information and retrieve it as necessary.
This is more like a refinement of transformer attention: instead of running attention over all tokens (which is very expensive as it's quadratic), it selects a subset of token spans and runs fine-grained attention only on those. So it essentially breaks transformer attention into two parts - coarse-grained (k-NN over token spans) and fine-grained (normal).
It might be a great thing for long-context situations. But it doesn't make sense when you want millions of different facts to be considered - making them into long context is rather inefficient.
But I don't think it's a good solution for bigger amounts of data - as in that case it's more beneficial if that can be formed into independent memories.
MacsHeadroom•1mo ago
zfountas•1mo ago
The quick take: To give you an example of processing speed, with a 7B model on an NVIDIA V100, EM-LLM processes (or generates) about 326 tokens/sec with a 51.2K context window (which is quite competitive for these old GPUs).
More broadly, EM-LLM is designed to make ultra-long contexts (memory-prohibitive for standard O(n^2) attention) computationally tractable. The Appendix C of our paper https://openreview.net/pdf?id=BI2int5SAC details how: significantly better attention scaling, efficient O(nm) memory formation, and large KV cache management via CPU/disk offloading. While there's a slight per-chunk overhead compared to the simplest retrieval methods initially, the crucial part is our ability to handle sequences at scales infeasible for full-context models. For instance, we're successfully using 8B models with 10M token contexts on a single GPU without prohibitive delays.
Regarding RAG in particular, EM-LLM often shows significant gains on tasks needing deep understanding of a single, long, coherent context. A key reason is that EM-LLM allows each layer to retrieve and integrate relevant information from different "episodes" of the context independently, offering more nuance than a typical single RAG step, for similar overall resource use.