Back to Module 4.
Problem 4.1 (Two temperatures).Logits are
on three tokens. Compute the softmax at and at , to three decimals. Does the argmax change?
Solution
Solution to Problem 4.1.
At
the exponentials are , with sum . The probabilities are . At
the scaled logits are . The exponentials are , with sum . The probabilities are . The argmax stays on the first token. Temperature changed the gaps, which is what Definition 4.1 claims.
Problem 4.2 (A nucleus).After temperature scaling, four tokens have probabilities
, already sorted. Apply Definition 4.2 with . Which tokens survive, and what are the renormalized probabilities?
Solution
Solution to Problem 4.2.
The cumulative sums are
, , , . The smallest with cumulative sum at least is . The last two tokens are dropped. Dividing the survivors by gives .
Problem 4.3 (Vote after normalization).Five samples box the strings
1/2,0.5,2,2, and0.5. What does a majority vote return if it compares raw strings, and what does it return if it compares values under Definition 3.2’s parser? Which one should self-consistency use?
Solution
Solution to Problem 4.3.
Raw strings:
0.5appears twice,2appears twice,1/2appears once. The vote is a tie between0.5and2, broken only by a secondary score.Parsed values:
1/2and0.5are the same number, so that value has three votes and2has two. The winner is. Self-consistency should vote on parsed values. Otherwise equivalent writings of the right answer split the vote and can lose to a repeated wrong string.