How does an AI answer? Watch a real one, one step at a time.

It's autocomplete: a language model guesses the next word, adds it, and guesses again. Here a real one runs in your browser, slowed down so you can follow every step. Every number you see is its own.

1Choose a model

Downloading the model's numbers…

2Write the start of a sentence

The model downloads once from Hugging Face and runs on your computer or phone; nothing you type is sent anywhere. The chat model, Mamba and every detail at once are in the Explorer.

  1. Your words become pieces
  2. Each piece gets its spot in the cloud
  3. One layer, up close
  4. Through every layer
  5. The wall of lights
  6. The weighted dice
  7. Again, word by word

1Your words become pieces

The picture: a big dictionary of pieces, each with a number. The model never sees letters, only these numbers.

2Each piece gets its spot in the cloud

Your pieces, each at its spot in the cloud.

The picture: a cloud with one dot for every piece in the dictionary. A piece's list of numbers is its address in the cloud, and pieces used alike sit close together: it comes from how a word is used, not how it sounds. The real cloud has one direction per number (from 128 to 768 in these models); the map squashes it flat, so distances on it are rough.

3One layer, up close

The knobs

Its numbers, before and after this layer

The picture: rows of volume knobs, set at the factory and glued. Before each row, the newest word listens back to the earlier words (pink) and blends in what matters. That listening is the only step whose mixing depends on what you type.

4Through every layer

The thought cloud: every piece in the dictionary is a dot, and pieces used alike sit close together.

The picture: the same thing, row after row of knobs. Next to each layer: what it would say if it stopped there (the “logit lens”), and in the cloud, every piece it might say lights up. Early layers are not built to be read this way, so their guesses look odd. The guess after each layer is a peek we take by running the model's final scoring early: the model itself only scores once, after the last layer, and never looks anything up in between. The cloud is a flat map of the model's own embedding rows (made with t-SNE); distances on it are approximate.

5The wall of lights

The same wall of lights, laid out as the thought cloud.

The picture: a wall with one light for every piece in the dictionary. Each glows by how closely the final list of numbers points the same way as that piece's row in the output table.

6The weighted dice

The picture: a dice loaded by the brightest lights. Usually the brightest wins; sometimes a dimmer one does. That is why the same start can give different stories.

7Again, word by word

That's the whole machine. Want every number at once, the chat model, attention arcs and the training view?

Everything here is real: the pieces, the numbers, the knobs, the listening (attention, averaged over every head of the layer), the guesses after each layer, the scores and the dice. The model engine (llm.js) is checked against the official transformers implementation, number by number inside every layer (the checks and their results). Only the speed is changed.