6/29
Part 2 of 6 · TemperatureLearn and do

Temperature divides the scores before the softmax

The first knob for leaving greedy behind is temperature.

for T in (0.5, 1.0, 2.0):
    print(T, (row / T).softmax(dim=-1).round(decimals=3))
Predict

Divide the logits by T = 0.5, 1 and 2 before the softmax. What happens to mat's 0.605?

Pick one to see what it prints.
Pick an answer above to see the rest
Predict

Can a temperature above 0 change which token is the argmax?

Pick an answer above to see the rest