Skip to content

Temperature and probability

The same model can look more or less confident without learning anything. Change temperature and compare the probabilities before sampling.

You will keep the input, model weights and logits fixed. The only change is the positive number that divides the logits before softmax.

The interactive experiment uses JavaScript. If it does not appear, enable JavaScript or reload. You can also read how attention works.

Probabilities, ranking and samples are different observations

Section titled “Probabilities, ranking and samples are different observations”

Dividing logits by the same positive number preserves their order. Softmax changes how concentrated their probability distribution is. A sampled token may still differ from one run to another. None of these sampling operations updates a weight.

Read probability and softmax, or run the comparison locally to inspect why a sharper distribution does not establish greater correctness.

Spotted a mistake, a confusing explanation or a broken widget? Report a problem with this page

Methods & evidence · Run locally

Free for noncommercial use. Text CC BY-NC-SA 4.0, code PolyForm Noncommercial. Source on GitHub · How to contribute