Gradient

Courses

∇\nabla∇The maths behind AI0/72
π\piπMaths0/84
  • Derivatives0/5
  • Probability0/6
⋆\star⋆AI for everyone0/10
Γ\GammaΓGame theory0/49
py\texttt{py}pyPython for AI0/15
y^\hat{y}y^​Build your own AI0/15
All courses

Tuition

My tuitionOlympiad trackCompetitions

Practice

ProjectsAsk a questionTrain on a GPUExplorationsMaths StoriesUnsolved problemsPlaygroundScience labsMock testsOlympiad

Reference

GlossaryBlogDiscoveries
P(x)P(x)P(x)Maths, module 13: Probability, lesson 3 of 6

Softmax and temperature

A network outputs raw scores of any size and sign. Softmax converts them into a proper probability distribution, and temperature controls how bold it is.

8 minute readOne thing to try6 questionsFree

Read the whole lesson free

Make a free account to read on, try the interactive parts, answer the 6 practice questions and keep your progress.

Create a free accountLog in

What this lesson covers

  • Logits are raw scores. Softmax turns them into probabilities that sum to 1.
  • Softmax depends only on differences between logits and keeps their order.
  • Temperature divides the logits first: low is sharp and predictable, high is flat and varied.

More in Probability

  1. 1Probability and distributions
  2. 2Conditional probability and the next token
  3. 3Softmax and temperature
  4. 4Cross-entropy
  5. 5Bayes' rule
  6. 6Entropy and information