Transformers and LLMs

Temperature, explained

Temperature is a sampling setting that controls how sharp or random a model's output distribution is.
Back to Glossary

Part of the Semantic Notion technical glossary.

Short Definition

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

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.

Start here

Need the broader concept map?

Return to the glossary index to move from this definition into adjacent AI, ML, mathematics, and computer science terms.