Brightlab
Brightlab
What happens when you type “The world is really changing because of the rise and fast adoption of Artificial”?
Follow one sentence through a real language model, GPT-2 small, to its next word. It is cut into tokens, turned into vectors, stamped with positions, mixed by attention, reworked by MLPs twelve times over, and finally turned back into scores and probabilities. Every step is maths from the first three lessons.
Where this happens: The whole forward pass, from typed text to the next token.
Starting knowledge: Lessons 1 and 3 (vectors, dot products, softmax). Lesson 2 helps with the idea that training shaped every number.
The animations are silent; captions carry the explanation. Pause whenever a caption changes and say what you expect next.
The whole trip in half a minute: tokens, vectors, positions, attention, twelve blocks, logits and softmax, ending with “Intelligence” at 98%.
Eight stages, each with a short explanation, an animation or a hands-on panel, and a question to think about. Go in order the first time.
Counterexample challenge. This lesson simplifies a lot: the animations show 16 of 768 numbers, 3 of 144 attention heads and one MLP. Choose one simplification and explain what a learner might wrongly conclude from it.
An ordered, accurate description of the eight stages; one claim supported by a real measurement from the lesson (for example the block-7 jump); a clear statement of what a 97.95% probability does and does not mean.
Real measurements from GPT-2 small (124 million parameters, 2019): tokens and IDs, embedding neighbours and the 2-D map, position waves, the three attention heads, block-by-block guesses, logits and probabilities. Illustrations: the embedding-table cells, the MLP neuron grid, the value-mixing strips and the attention score bars (derived from real weights). Block-by-block guesses decode an unfinished vector with the model’s final layer: a useful approximation, not what the model computes at that point. Modern models are far larger and differ in details such as rotary positions, but follow the same pipeline.