Analysis updated 2026-05-18
Study a new sparse memory mechanism for long-context language models.
Reproduce the paper's perplexity and RULER retrieval benchmark results.
Plug the Sparse Delta Memory layer into a Meta Lingua based training run.
Run a smoke test to check that the custom GPU kernels compile and work.
| facebookresearch/sparse-delta-memory | alluxio/alluxio-py | case211/skill-remnawave-xray | |
|---|---|---|---|
| Stars | 31 | 31 | 31 |
| Language | Python | Python | Python |
| Last pushed | — | 2025-09-29 | — |
| Maintenance | — | Quiet | — |
| Setup difficulty | hard | moderate | easy |
| Complexity | 5/5 | 3/5 | 3/5 |
| Audience | researcher | data | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires an SM 80+ GPU (Ampere or Hopper), PyTorch 2.8+, Triton 3.4+, CUDA toolkit, and a C++ compiler for JIT kernel builds.
Sparse-Delta-Memory, or SDM, is Meta's research code released alongside an academic paper about a new way for AI language models to remember information across very long pieces of text. Most large language models struggle to recall details from far earlier in a long document or conversation, and this project proposes a new kind of memory component meant to help with exactly that problem. The core idea is a large, sparse memory bank that the model reads from and writes to using something called product keys, combined with a gating mechanism, similar in spirit to a technique called deltanet, that controls when the memory forgets old information and when it accepts new information. This is not an end user application. It is a research component meant to be plugged into a larger language model architecture, and the repository is built as a fork of Meta's existing Lingua research codebase, reusing its data preparation and training tools. The README includes benchmark results comparing this method against other memory approaches called Mamba2 and GDN, measured on perplexity, which is a measure of how well a model predicts text, and on a long context retrieval test called RULER. Across most of the reported tasks, SDM performs better than the comparison methods, especially at longer context lengths, though it does worse on a couple of individual tasks. Running this code requires real machine learning infrastructure: a modern GPU from Nvidia's Ampere or Hopper generation, a specific and fairly recent version of PyTorch and Triton, a working CUDA toolkit, and a compiler, since custom GPU kernels are compiled the first time they run. The README does provide a quick smoke test that exercises the GPU kernels without needing any real training data, plus instructions for a minimal training run using randomly generated text, before pointing to the steps needed for full scale training with real datasets. The code is released under a Creative Commons Attribution NonCommercial license, meaning it can be used and shared but not for commercial purposes.
Meta's research code for a new AI memory component that helps language models recall information across very long text.
Mainly Python. The stack also includes Python, PyTorch, Triton.
Can be used and shared for non-commercial purposes only, under the Creative Commons Attribution NonCommercial 4.0 license.
Setup difficulty is rated hard, with roughly 1day+ to a first successful run.
Mainly researcher.
This repo across BitVibe Labs
Verify against the repo before relying on details.