/ THE IDEA
The model first produces one score per possible next text piece. These scores are called logits; they are not yet probabilities. A function called softmax converts them into positive probabilities that add to one. Dividing scores by temperature before that conversion changes their relative influence. Lower positive temperatures enlarge score differences and concentrate probability on the leader. Higher temperatures compress differences and spread probability more evenly. Sampling then draws a choice using the resulting chances. The highest-scoring choice remains highest; its lead becomes stronger or weaker.
THE FORMAL IDEA
p_j = exp(z_j/T) / Σ_k exp(z_k/T)
| p_j = probability of choice j; z_j = its score; T = positive temperature. These numbers have no physical units; temperature here is not degrees. | | exp(x) means e raised to x, with e about 2.718. Σ_k means add the expression for every possible choice k. |
|
RUN THE TINY EXAMPLE
Change one thing. Predict what happens.
Two choices have scores ln(3) and 0. ln(3) means the power of e that gives 3, so exp(ln(3)) = 3. At T = 1, exponentials are 3 and 1: probabilities 3/(3 + 1) = 3/4 and 1/4. Change T to 0.5: the first exponent doubles, so its exponential becomes 3² = 9; the other remains 1. Probabilities become 9/(9 + 1) = 9/10 and 1/10: the leading choice is more dominant.
|
Nothing new was learned about the sentence. Only the rule translating the same scores into selection chances changed. In repeated draws, the second choice becomes less common, not logically impossible.
/ SO WHAT?
This also explains why temperature is not a factuality dial. A false but strongly favoured continuation can become even more dominant at low temperature. Checking evidence, constraining output and evaluating the task address different problems. Distinguish varied wording from improved reasoning before attributing a better answer to a single setting.
ONE CAVEAT |
| These are invented scores. Other generation settings can filter or alter the probabilities too. Zero temperature is usually implemented as a special deterministic choice rule rather than literal division by zero. |
KEEP THIS
Lower temperature amplifies existing score differences; it does not supply missing evidence.
|
NEXT: Why averaging cannot fix every measurement error
|