02
A distribution of answers
Separate what could happen from what happened in a few samples.
Possibilities are not counts
Suppose repeated responses to our prompt include 5, The answer is 5., and 6. They are three possible answers, not three steps in one answer.
A stochastic policy assigns probabilities; a sampled group records what was actually drawn. These are different objects. A probable answer can fail to appear in a small group. A less probable answer can appear more than once. Sampling permits variety, but does not promise it. Spinning Up: stochastic policies
A deliberately small world
To see that distinction without downloading a model, our lab uses only three whole-completion choices. These choices and logits are invented teaching inputs, not measurements of an LLM.
| Index | Completion | Logit | Probability |
|---|---|---|---|
| 0 | 5 | 1.2 | 58.96% |
| 1 | The answer is 5. | 0.4 | 26.49% |
| 2 | 6 | −0.2 | 14.54% |
A logit here is an unnormalized score. Softmax turns the three scores into probabilities:
The probabilities sum to one before display rounding. The table's percentages sum to 99.99% only because each is rounded separately.
Temperature changes the distribution
At temperature , 5 has probability about 0.5896. Lowering to 0.5 increases it to about 0.7919; raising to 2 lowers it to about 0.4615. Those numbers follow from the formula and the fixed toy logits.
This does not say that higher temperature is generally better or worse. It says what division by does to this particular distribution. Nor does changing a sampling setting train a model.
The lab draws an entire completion as one category. A real autoregressive language model selects tokens from changing, context-dependent distributions. The preceding trajectory picture explains that mechanism; this simplified sampler lets us inspect probabilities, sampled groups, and scores.
Check your understanding
If 5 has probability about 59%, must exactly 59% of six rollouts be 5?
Reveal answer
No. Six draws can only produce counts from zero to six. A finite sample is not the probability distribution itself.
Once we have sampled an answer, how do we decide what feedback it receives?