Next token prediction, and what attention looks at

The model reads left to right and predicts the next token from everything before it. Attention is how each position pulls information from earlier tokens. Step through the sentence, and click any token to inspect where its attention goes.

Predicted next token, distribution over candidates

Current step

Step
1 of 7
Tokens seen
1
Top prediction
the
Probability
0.00

Distributions and attention weights here are illustrative, chosen to look plausible. They are not read from a real model. The shape of the mechanism is the point.