Memory instead of compute
What Engram is, why a lookup table belongs next to Mixture-of-Experts, and what DeepSeek measured with it.
Some knowledge is a lookup
“Alexander the” is followed by “Great”. A transformer spends layers working that out every time it reads the phrase.
Language has a lot of this: names, idioms, code boilerplate, phrases that always mean the same thing. None of it depends on the rest of the document. It is static: the last two or three tokens are enough to know it.
A transformer has no native way to look something up. It has to rebuild these patterns with attention and MLPs, in its early layers, on every token. Engram's premise is that this is wasted depth: give the model a table it can read for the static part, and the layers can work on what actually needs computing.
Two kinds of sparsity
The Engram paper (Cheng, Tian et al., arXiv 2601.07372, January 2026) frames it as a second axis of sparsity next to Mixture-of-Experts:
| MIXTURE-OF-EXPERTS | ENGRAM | |
|---|---|---|
| What is sparse | Computation: a router picks a few expert MLPs per token | Memory: a hash picks a few table rows per token |
| Chosen by | The hidden state (learned routing) | The token ids alone (deterministic) |
| Cost per token | A few expert MLPs | A few row reads, then two projections |
| Good at | Anything that needs computing | Static, local patterns |
Because Engram's addresses depend only on the input tokens, they are known before the forward pass starts. That detail ends up mattering a lot for serving (lesson 6).
Quick check
What decides which Engram rows a token reads?
What the paper measured
DeepSeek trained models with the same total parameters (26.7B) and the same activated parameters (3.8B) on the same 262B tokens. Engram-27B moves 5.7B parameters from routed experts (72 down to 55) into two Engram layers. From the paper's Table 1:
| BENCHMARK | MOE-27B | ENGRAM-27B | ENGRAM-40B |
|---|---|---|---|
| MMLU | 57.4 | 60.4 | 60.6 |
| CMMLU | 57.9 | 61.9 | 63.4 |
| BBH | 50.9 | 55.9 | 57.5 |
| ARC-Challenge | 70.1 | 73.8 | 76.4 |
| HumanEval | 37.8 | 40.8 | 38.4 |
| GSM8K | 58.4 | 60.6 | 62.6 |
| MATH | 28.3 | 30.7 | 30.6 |
| Validation loss | 1.768 | 1.634 | 1.610 |
Quick check
Engram-27B and MoE-27B were compared at equal…
If you took the N-Grammer course
N-Grammer is the closest relative. Both add an n-gram table to the residual stream, but they key it differently:
| N-GRAMMER (YUMON) | ENGRAM | |
|---|---|---|
| Keys | Latent cluster ids of the hidden state | Surface token ids, normalized |
| Orders | Bigrams | 2- and 3-grams |
| Table | Exact: one row per id pair | Hashed into prime-sized tables, several heads |
| Uses the hidden state for | Computing the ids | Gating what comes back |
| Added to x | Linear projection, zero init | Gated value + short conv |