Show HN: A linear model is an embedding table: using VW as transformer memory A prototype that trains a Vowpal Wabbit (VW) linear model as a precomputed n-gram embedding table and plugs it into a 4-layer transformer as an Engram-style memory cut evaluation cross-entropy from 5.16 to 4.82 nats, a 0.34-nat gap, on a 1-million-token holdout of cleaned WikiText-103. The two otherwise identical students trained for 4,600 steps of 8 × 512 tokens (about 20 million tokens) on the same batches, with the memory student gaining 29% lower perplexity for less than 0.1% more compute per training step plus a one-off CPU VW fit. The targets were Qwen2.5-0.5B hidden states at layer #4, compressed with PCA to d = 64 dimensions, and the author notes VW's online learning means the exported table need not stay frozen. A linear model is an embedding table: using VW as transformer memory Experiment, 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.