Interactive explainer · no math degree required
How a language model writes
One word at a time. You press the button, the machine rolls a dice.
The text so far
your prompt model's words latest pick
Next-word candidates
p(tokeni) = esi / T / Σj esj / T
Each candidate has a raw score s (its logit). Temperature T divides the scores before the softmax: cold T stretches the gaps, hot T squeezes them. A real model scores ~50,000 tokens at once and keeps the top-k — here k = 6. All scores are hand-made; no real model runs in this page.
Temperature — how risky is the dice?
T = 1.00
cold · predictablebalancedhot · surprising