Problem of practice
“Explaining how a large language model works is abstract and hard to picture, and static diagrams don't show how a token moves through each stage.”
Learning goal
Learners will be able to describe the main stages a language model uses to turn a prompt into the next token (tokenizing, embedding, attention, feed-forward, sampling) and explain how the KV cache and prefill versus decode work.
What it does
TokenTown lays out a miniature language model as a city. Type a prompt and press Run, and a convoy carries your text through the tokenizer docks, attention plaza, feed-forward mill and sampler. Each district stops to explain itself, and the next word is chosen and sent back around again. The numbers are really computed in the browser, but the model is scaled down and its output text is only scenery.
- Isometric city map where each district is a stage of the model, with click-to-fly navigation and explanations
- A convoy follows a typed prompt through the model, with live panels for context, output, attention and the next-token ch
- Controls for speed, number of layers, temperature and top-p, plus pause, step and reset
- Reading stops at each district on the first pass, with a clear note on what is real and what is scaled down or faked



