Senthil Arivudainambi

Logits, Softmax and Temperature in LLMs

03 May, 2025

My notes on Logits and Softmax.

Logits and Softmax

From the graph below, you can see the behavior of \(exp(\frac{z_j}{T})\) as \(T\) changes.


Temperature in LLMs

\[\sigma = Softmax\left( \frac{z_i}{T} \right) = \frac{exp\left( \frac{z_i}{T} \right)}{\sum_{j=1}^{n} exp(\frac{z_j}{T})}\]