Generation behavior · about 15 minutes of study

Temperature

Temperature changes the sharpness of a sampling distribution by scaling logits. Lower values concentrate probability; higher values spread it.

Before you start: Review Next token first. Python-like examples use variables, lists and functions.

Guided concept walkthrough

Follow the mechanism

Scores

Keep the same toy logits.

1 / 4

A conceptual animation, not a live model trace. Play advances every five seconds and stops at the final stage.

Start with an everyday explanation

Imagine making a raffle favor the most common answers more strongly or less strongly. Changing the raffle does not check the answers against a source.

See a concrete example

With logits [2,1], the first option has probability about 0.731 at T=1 and 0.881 at T=0.5. Neither number measures factual accuracy.

A claim to question

Cold means less varied sampling, not more truthful output by definition.

Try before revealing the answer

Use the sampling simulator to compare T=0.5 and T=1.5. Explain why a wrong top logit remains a problem.

Show the worked answer

The distribution changes while the underlying evidence does not. Fix missing evidence or model/task fit rather than relying on temperature as a correctness control.

Now explain the idea to someone else using your own example. If you cannot explain a stage, revisit it before moving on.

Your explanation and revision notes

Loading local notes…

Read the primary reference

Generation configuration

The explanation and exercises are original teaching material. The linked source provides background; examples and assumed numbers here are not claims about a particular company.