EXHIBIT 02 / LANGUAGE MODELS
How does an answer emerge,
one token at a time?
In standard autoregressive generation, a language model does not begin with a finished answer. At each position it scores possible next tokens; software selects one, appends it to the available context, and repeats.
THE SHORT ANSWERScore. Select. Append. Repeat.
One loop produces the whole response.
- 01 / CONTEXTRead what exists
The prompt and already selected tokens form the context for the next position.
- 02 / MODELScore candidates
The model produces a distribution over possible next tokens.
- 03 / RUNTIMESelect one
Decoding rules choose a token. Temperature can sharpen or flatten the distribution.
- 04 / LOOPAppend and repeat
The selected token becomes part of the next context. A stop condition ends the loop.
A token is a model unit, not necessarily a word or a character. This mechanism explains generation; it does not settle whether a model “thinks.”
Follow one sentence through five moments.
Nothing runs automatically. Advance the teaching sequence and keep the visible sentence beside the operation that produced it.
VISIBLE TEXT
The afternoon is warm, so we walk to the
CURRENT OPERATION
Context received. No next token has been selected.
A prompt establishes the context. The model has not written the answer yet.
Keyboard: when this exhibit has focus, use ← and → to change steps.
Change one setting. Watch the chances move.
The six candidates and their scores are invented for this exhibit. Your browser performs the softmax calculation; no model or external service is called.
Several candidates remain plausible, while the highest-scored option still leads.
The denominator is only these six editorial candidates—not a real model’s vocabulary. “Effective candidates” describes how spread out this six-item distribution is; it is not a token count from a model run.
What happened here—and what did not.
Next-token generation
The exhibit describes autoregressive text generation: each new token depends on the preceding context.
Temperature calculation
Your browser recalculates a six-candidate softmax distribution as the slider moves.
A real model inference
The sentences, candidates, scores, and five-step trace were written in advance. They are not hidden model reasoning or provider telemetry.
PRIMARY READING
OpenAI Academy · AI fundamentals official explainer ↗ The source supports the contextual next-piece prediction description. The six candidate scores and all displayed probabilities belong only to this museum’s teaching example.