Temperature

Temperature is a sampling setting that controls how sharp or random a model's output distribution is.
Also known as
sampling temperature

Intuition

Lower temperature makes the model more conservative. Higher temperature makes lower-probability choices more likely.

Technical definition

Temperature rescales logits before softmax sampling, changing entropy in the resulting token distribution.

Example

A code-generation system may use low temperature for reliability and higher temperature for brainstorming.

Common misunderstandings

  • Temperature does not change the model weights.
  • Higher temperature is not the same as better creativity.

Need this inside a product?

The studio builds the systems these terms describe. Tell us what you are working on.