Start with the mechanism
Quick try · 30 seconds
Which fragment comes next?
The model does not write everything at once. It evaluates possible continuations, chooses one, and repeats.
The cat drinks …
Choose a continuation proposed by this simulation:
- 01ContextWhat is already written
- 02ScoresContinuations are compared
- 03ChoiceOne token is selected
Fictional probabilities prepared for teaching. A real model compares a much larger vocabulary.
Three steps to keep in mind
- 1
Read the context
Instructions, the request, and previously generated tokens form the current input.
- 2
Score possible continuations
The model assigns scores to tokens; decoding turns those scores into a choice.
- 3
Add and repeat
The chosen token joins the context, so the next distribution is different.
Try it yourself
The lab isolates this mechanism with a small, transparent simulation. Everything runs locally in your browser.
Open “Token-by-token generation”Keep these three ideas
Go deeper when you need it
Technical detailWhat the short version leaves out
Temperature changes how concentrated the distribution is. Lower values usually favor leading candidates; higher values give secondary candidates more weight.
Real systems may also use top-k, top-p, penalties, stop rules, tools, and cached intermediate calculations.
Your local progress
Status: Not started
Progress stays on this device.