Inside a Transformer
A free, interactive map of a real (tiny) transformer running a sentence. Start at "text in, next word out" and zoom, level by level, down to a single attention score, with a plain-language explanation and live numbers at every level.
- Follow one word through the model: "it" finds "dog", and "was" ends up predicting "hungry".
- Switch parts off (positions, the causal mask, the residual stream, the ÷√d, the norms) and watch what breaks.
- A 27-stop guided tour, in the order the model computes.
- Ten hands-on playgrounds: the tokenizer, embeddings, position clocks and RoPE, query × key, softmax and √d, an attention head, the residual stream, a neuron, scoring every word, and generation with the KV cache.
Free, no sign-up, no ads. It runs entirely in your browser.
Loading the map…