Skip to content
INDIE / MACHINE
CONCEPTLESSON 1 OF 66 MIN

Memory instead of compute

What Engram is, why a lookup table belongs next to Mixture-of-Experts, and what DeepSeek measured with it.

STEP 1 / 6QUIZ 0 / 2
01 /

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.

02 /

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-EXPERTSENGRAM
What is sparseComputation: a router picks a few expert MLPs per tokenMemory: a hash picks a few table rows per token
Chosen byThe hidden state (learned routing)The token ids alone (deterministic)
Cost per tokenA few expert MLPsA few row reads, then two projections
Good atAnything that needs computingStatic, 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).

03 / CHECK YOURSELF

Quick check

What decides which Engram rows a token reads?

04 /

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:

BENCHMARKMOE-27BENGRAM-27BENGRAM-40B
MMLU57.460.460.6
CMMLU57.961.963.4
BBH50.955.957.5
ARC-Challenge70.173.876.4
HumanEval37.840.838.4
GSM8K58.460.662.6
MATH28.330.730.6
Validation loss1.7681.6341.610
05 / CHECK YOURSELF

Quick check

Engram-27B and MoE-27B were compared at equal…

06 /

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
KeysLatent cluster ids of the hidden stateSurface token ids, normalized
OrdersBigrams2- and 3-grams
TableExact: one row per id pairHashed into prime-sized tables, several heads
Uses the hidden state forComputing the idsGating what comes back
Added to xLinear projection, zero initGated value + short conv
LESSON 1 COMPLETE

Up next: Tokenizer compression