It's autocomplete: a language model guesses the next word, adds it, and guesses again. Here a real one runs in your browser, and every number about its work comes from its real weights (pictures and reference figures are labelled). Your prompt becomes numbers, falls through every layer of knobs, and lands in the token cloud, where the model's options light up and a dice roll picks one.A version for kids and classrooms · Code on GitHub.
A machine with millions of glued knobs, and a cloud of words. Open it, then watch the real thing below.
🔤Each word gets a spot in a cloudEach word is looked up and becomes its own list of numbers: its address in the token cloud. Words used alike sit close together (it comes from how a word is used, not how it sounds).On the board: tokens and the embed strips
🎛️Volume knobs, set at the factory and gluedRows of knobs turn parts of the list up or down and mix them. Training set every knob; nothing you type turns them.On the board: the dials in every layer
👂Before each row, it listens backEach word listens to the earlier words and blends in the ones that matter. The only step whose mixing depends on what you type.On the board: the pink arcs and the bars on the context tape
💡A wall of lights, one per wordAt the end, every word in the dictionary gets a light that glows by how well the final list of numbers matches it.On the board: the unembed, then the token cloud
🎲A dice weighted by the brightest lightsUsually the brightest wins; sometimes a dimmer one does. The temperature slider sets how loaded the dice is.On the board: choose
🔁Add the word, and go againThe new word joins the line and the whole thing runs again for the next one. That is all it ever does.On the board: repeat
How close are two words in the cloud?
Compares the two words' rows in the loaded model's embedding table (1 = the same direction, 0 = unrelated). Try two / too, red / read, cat / dog.
Where the picture bends
A real layer does more than turn parts up or down: it mixes every part with every other part, and it has bends that plain knobs cannot make. Listening back is not magic: it is worked out from the same glued knobs and the words themselves. And the wall of lights is one more set of knobs: one row of numbers per word, compared with the final list of numbers.
1Choose a model
Runs a real small language model in your browser and shows its actual numbers. It downloads 269 MB from Hugging Face once (your browser keeps a copy) and uses about 900 MB of memory, so a laptop or desktop works best.
2Write the start of a sentence
3Watch it pick the next words
The context
If it stopped after each layer
Unembed
Token cloud
0.7
This model comes with no suggested setting; 0.7 is this page's choice. At 0 the top token always wins.