This is GPT-2 small, a compact model with the same skeleton as today’s large ones. The prompt is cut into tokens. Each token becomes a list of 768 numbers and travels down its own lane through 12 identical blocks.
At the end, the last lane is turned into a score for every token in the vocabulary, and one token is picked as the next piece of text. The model adds it to the prompt and runs again. Everything an LLM writes is produced this way, one token per pass.
Zoom in anywhere. Each part opens up to show what is inside it, down to single numbers.
Where the parameters are 31.6% 22.8% 45.5%
Token and position tables 39,383,808 31.6% Attention 28,348,416 22.8% MLPs 56,669,184 45.5% Layer norms 38,400 <0.1% How to read the drawing A lane: the 768 numbers that belong to one token Text or token IDs One number for each of the 50,257 tokens A table the model looks things up in Attention, the part that crosses lanes MLP, one per lane Layer norm + A result is added to the lane Where you are
Parameters 124,439,808
Blocks 12
Numbers per lane 768
Attention heads 12 per block
Vocabulary 50,257 tokens
Longest input 1,024 tokens Structure, sizes, token IDs and merge numbers are GPT-2’s real ones. Attention patterns, vector values and scores are examples made up for illustration.
Zoom into Prompt Tokenizer Embedding Blocks 1 to 12 Final norm Unembedding Softmax Sampling