2026-11-27 16:19 UTC

Small experiment reports lower loss with frozen VW memory

state: expiredheat: mediumuncertainty: mediumrelevance: mediumllm-memory external-knowledge linear-modelsMax Pagels

What is this?

On 9 November 2026, Max Pagels published a small experiment using Vowpal Wabbit (VW), an online-learning library, as a frozen lookup-table memory for a distilled transformer. VW was trained on hidden states from Qwen2.5-0.5B, compressed to 64 dimensions; the resulting table was added behind a gate to a four-layer student trained on WikiText-103. The author reports lower held-out cross-entropy with memory after 4,600 training steps. The source is the experiment author’s own blog post; it gives no independent replication, and says reproduction code is available upon request. The Hacker News listing is dated 10 November. The supplied web results offer no direct corroboration of this experiment.

Why it matters

The experiment suggests one way to separate some learned information from a transformer’s weights: precompute a hashed n-gram table, then let a model learn to use it. If this approach generalizes, memory might be updated or specialized without retraining the whole model. The reported result is promising but limited to one small-scale setup, so the practical gains and update behavior remain unestablished.

Current assessment

Pagels reports that two otherwise identical four-layer students, distilled from Qwen2.5-0.5B and trained on the same batches from cleaned WikiText-103 (about 20 million tokens), reached held-out cross-entropies of 5.158 without memory and 4.819 with a frozen VW lookup table, evaluated on one million tokens. The post describes the gap as 29% lower perplexity and says the memory added less than 0.1% compute per training step, apart from a one-off CPU fit. These are author-reported results from a single experiment, not independently verified. VW learns hashed n-gram vectors to predict compressed layer-4 teacher hidden states; the student adds their sum to its hidden state after layer one through an Engram-style gate. The proposed next step is online updating of the table while leaving the student weights unchanged, potentially enabling modular or per-customer memory. That capability is a proposal, not demonstrated here: the reported table was frozen, and the post says future experiments are planned. The training run, corpus, and student are small, and the reproduction code is available upon request rather than linked as an open release. Track for replication, broader evaluations, and evidence that separately updated memory remains useful and reliable.

Measured heat

now 0 pts/hpeak 0 pts/hcomments 0/hpeers p33momentum: steady2 platformsage 383h
points/hour across evidence · reading as of 2026-11-24 23:26:51.614687+11:00 · deterministic, not a model opinion

How the heat travelled

11-08 13:00⭐ origin echo-reconstructedThe Liminal Planes post identifies DeepSeek's Engram as inspiration, but its own VW experiment is the origin of this specific news item. It
Liminal Planes on blog (echo) · attributed from hn.story.50439172
—
11-10 12:08first on hacker news · published · +47.1hShow HN: A linear model is an embedding table: using VW as transformer memory
maxpagels
—
11-10 12:08amplified on hacker news 👑hn.story.50439172
maxpagels
peak 2 · 0 comments · 104% of case engagement
11-10 12:20our radar first saw it · +47.4hdiscovery anchor: hn.story.50439172—

Evidence (2) — ⭐ canonical anchor

sourceobjectauthorscorecomments
🟧 hnShow HN: A linear model is an embedding table: using VW as transformer memory
Retrieved article excerpt

Open article · Retrieved 2026-11-10T12:22:07.631448+00:00

# A linear model is an embedding table: using VW as transformer memory

Experiment, 9 November 2026

In early 2026, DeepSeek introduced a "conditional memory" module called [Engram](https://github.com/deepseek-ai/Engram).

Put simply, Engram adds a very large lookup table to the neural network architecture. At each token position, Engram takes the last few preceding tokens, hashes the n-grams they form, and fetches the table entries at the hashed positions. These entries are combined into a memory vector, which the model can draw on through a gate. The table values are learned by backpropagation, along with the rest of the model during training.

Such embedding tables could conceivably be precomputed outside the normal training regime, possibly shortening training time and providing a more modular architecture. To test this, we built a prototype that trains the memory table with [Vowpal Wabbit](https://vowpalwabbit.org) (VW), an online learning library, and then plugs the table into a transformer as an in-memory lookup. VW is a natural fit for several reasons:

- **A VW model already is an embedding table, if we think creatively.** VW hashes every feature into a fixed-size weight array. If we use cost-sensitive one-against-all classification with `d` classes (`--csoaa d`), where `d` is the dimension of the memory vector, we can learn `d` linear outputs per feature. This way, each hashed n-gram corresponds to a `d`-dimensional vector. For each example, VW's `d` raw predictions are the sum of the vectors of the active n-grams, which is exactly what PyTorch's `EmbeddingBag` computes in sum mode. This insight means we can read VW's weights and load them into PyTorch without conversion.
- **Hashing is built in.** VW hashes features into buckets, with optional namespaces. We can pass it n-grams as plain text, and never build an explicit vocabulary of n-grams.
- **It's cheap and fast.** Training is plain linear regression with SGD on a CPU. No GPU, no backpropagation through a network, and constant memory regardless of dataset size.
- **VW learns online.** More on this later.

So what should VW learn to predict? Engram's table only has to help the next-token loss, which VW will never see as an external system. Instead, we run a pretrained model (specifically Qwen2.5-0.5B) over training data and record the model's hidden state at layer #4 for every token. [1](https://www.liminalplanes.com/blog/vw#fn-1). Each hidden state is compressed with PCA to `d = 64` dimensions and scaled. These form the targets VW learns to predict.

After training VW on the data for two passes, we export its weights as a lookup table and freeze it. The student, a 4-layer transformer trained by distillation from the same teacher, looks up the active rows at each position, sums them into a memory vector, and adds it to its hidden state after the first layer, behind an Engram-style gate. The student only learns how to read the memory, and how much to trust it.

What ended up happening? We trained two otherwise identical students for 4,600 steps of 8 × 512 tokens on cleaned WikiText-103 (about 20 million tokens): one without memory, one with the frozen VW lookup. Both saw the same batches in the same order, and both were evaluated on a holdout of 1 million tokens.

Cross-entropy (nats)No memory · 5.158Frozen VW memory · 4.8195004600 steps

Held-out cross-entropy over 4,600 training steps, lower is better.

The student with memory ends at an evaluation cross-entropy of 4.82 nats against 5.16 without, a gap of 0.34 nats. Put another way, *29% lower perplexity for less than 0.1% more compute per training step, plus a one-off VW fit on a CPU*. Since the VW step is negligible compared to transformer training, this experiment shows that precomputing fundamental language features and providing them as a simple lookup table instead of training them as normal network weights can have a large effect on accuracy with a modest compute penalty, at least at this scale.

Finally, a note about perhaps the most desirable feature of VW: it learns online, one example at a time. This means the table doesn't have to stay fixed once it's exported. VW can keep training on new knowledge, while the student stays exactly as it is: no gradients, no retraining, just a new set of rows to look up. Such a setup could give transformers a knowledge base that can be updated cheaply, continuously, and separately from their weights, opening up possibilities such as pluggable domain-specific knowledge or per-customer memory. We look forward to experimenting with these in future work.

Code for reproduction available upon request.

1. In theory, fundamental features form in early layers of transformers, hence the choice of #4 [↩](https://www.liminalplanes.com/blog/vw#fnref-1)
maxpagels20
🟧 echo.blog ⭐The Liminal Planes post identifies DeepSeek's Engram as inspiration, but its own VW experiment is the origin of this specific news item. It Liminal Planes——

Interpretation history

Decision trace