NLP, explained by playing with it
Five chapters on how language models actually work, each with something you can touch. Drag a slider and the attention weights move. Pick a head and watch where a pronoun looks. Guess what BERT will fill in, then see the real probabilities.
The chapters
Each one opens with a question or a failing example, says the idea in plain words, then hands you the explorer.
Ready now2 of 5, about 24 minutes
- 1EmbeddingsOne vector per word, whatever the sentence says. See where that helps and where it breaks.Open this chapter
- 3AttentionA learned lookup. Change a number, watch the weights move, see why the square root is there.Open this chapter
Still being writtennothing to click yet
- 2SequencesReading one word at a time, and why a long sentence squeezed into one vector loses its grip.
- 4TransformersStack the block, count the parameters, and see what grows with the square of the sequence.
- 5BERTLook inside 144 real attention heads, then guess what the model will fill in before it tells you.
How to use this site
Play first, read second
Every explorer works before you have read a word of the theory. Move something, see what changes, then read why. The prose is there to explain what you just saw, not to prepare you for it.
Take the short path or the long one
Equations and tensor shapes sit behind a "go deeper" toggle on each explorer. Skip them entirely and the chapters still make sense.
Check anything you doubt
Each explorer names the file or the model its numbers came from. If a figure looks wrong, the source is one click away, and the notebook lets you recompute it yourself.
Share what you find
The explorers put their state in the address bar, so a link carries whatever you were looking at. Useful for a question, or for teaching from it.
Where the numbers come from
Nothing on this site is a number somebody remembered. The explorers either read a file produced by a real model run, or they do the arithmetic in your browser while you watch. Anything hand chosen for teaching carries anIllustrative label.
The data behind the explorers
- Static word vectors
glove-wiki-gigaword-50- Contextual model and attention
bert-base-uncased- Sentiment
distilbert-base-uncased-finetuned-sst-2-english- Files generated
- 22 datasets, 6340.5 KB in total, on 2026-12-06
These are the same checkpoints and the same GloVe variant the Colab notebook loads, so the site and the live demo cannot disagree.
Source: bert-base-uncased, bert-large-uncased, distilbert-base-uncased-finetuned-sst-2-english. Generated 2026-12-05 by pipeline/param_counts.py.5.3 KB, checksum 806ad5d44018.