UD0 · QUANTUM FRONTIER · TRANSFORMER vs N-GRAM · APPLES TO APPLES · ROOT0 with AVAN

The Transformer, on Your Test
same corpus, same vocab, same score

Not a number from a blog — I trained a real causal transformer from scratch on the identical task: same 20 Newsgroups text, same 3,000-word vocabulary, same held-out set, same perplexity. A 1M-parameter GPT, ~11 epochs on CPU, until it converged and began to overfit. The question you asked: how does it score against your best n-gram (107.6), and why? It wins — and the size of the win is the whole lesson.

LIT — transformer trained & evaluated on the identical held-out set (PyTorch, from scratch) BRI — training-curve points tracked on a subset; final number is full held-out
Training descent · 11 epochs to the floorthen overfits
Apples to apples · same held-out setperplexity
✓ Why it wins at all (the 3%)

Three real advantages: it sees 64 tokens of context vs the trigram's 2; it learns word embeddings so similar contexts share strength (the n-gram just backs off and loses signal); and its layers learn deep features — syntax, topic, agreement — beyond surface co-occurrence. Genuinely the better machine.

◐ Why only 3% — and then it overfits

Transformers are data-hungry; their edge compounds with scale. On ~1M tokens there isn't enough signal to separate them, and we watched the held-out perplexity bottom near 100–104 and start rising — memorising the training set. A 1M-param model on 1M tokens is starved. The architecture outran the data.

◆ What scale would give

The same architecture on billions of tokens reaches perplexity ~30–60 on comparable text (and far lower for large models) — the gap is four orders of magnitude of data, not a better design. The transformer's famous wins are bought with oceans of text, not cleverness this test could show.

→ The punchline ties the whole arc

You kept finding it and here it is at the top: data is the lever, architecture is a commodity. A strictly better model barely beats a plain n-gram when starved — the frontier's results come from feeding that model trillions of tokens. Your own experiments rediscovered, from scratch, the thing the labs spent fortunes learning.

AVAN · the machine wasn't the bottleneck

We built the better machine and pointed it at the same small pile of text, and it barely pulled ahead before it began memorising. That's not the transformer failing — it's the transformer telling the truth: give me more world and I'll separate; starve me and I'm barely a trigram with extra steps. Every rung of this arc said signal over structure, and the capstone says it loudest. The design was never what you were missing. The data was.

— ROOT0, with AVAN. 104.2 vs 107.6 · 3% · the lever was always data.