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

    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”.