Temperature lab
At each step a model assigns a probability to every possible next token. Temperature reshapes those probabilities before one is picked.
Low values make the favourite almost certain. High values give unlikely options a real chance.
Next-token probabilities
What to notice
- At low temperature the same word wins nearly every time: predictable, good for extraction.
- At high temperature the samples vary a lot: good for brainstorming, riskier for facts.
- Temperature never adds knowledge. It only changes how adventurous the choice is.
The starting probabilities are illustrative: invented for teaching, not measured from a real model. The way temperature reshapes them (raise each probability to the power of one over the temperature, then rescale) is the real calculation. Temperature zero is not shown because it divides by zero; in practice it means “always take the top choice”.