Follow a token through a Transformer
Follow how earlier words produce scores for the next piece of text, so you can inspect what the model is doing.
- Starting information
Earlier tokens and one current position
- Relationship or operation
Mask future positions; combine allowed context
- Consequence
Scores for the next token
A decoder transformer predicts using available earlier context. A causal mask prevents future tokens from leaking into that position's calculation.
Your learning goal
Trace embeddings, two attention heads, normalization, residuals, feed-forward layers, logits, and decoding; explain the KV cache.