The Terminator's Menu of Choices
When the T-800 in Terminator 2 displays several possible replies before choosing one, it offers a useful picture of sampling: assign weights to alternatives, then apply a selection rule. It is an analogy for a stochastic process, not evidence about how human choice works.
Deterministic and Stochastic Procedures
- Deterministic: a fully specified procedure and state produce the same output. Arithmetic and pure functions are common examples.
- Stochastic: the procedure includes a random variable, so repeated runs can produce different outputs described by a distribution.
A language model computes logits for possible next tokens. A decoder can sample from the resulting distribution, or it can choose greedily with argmax. Random sampling is therefore a decoding choice layered on top of a model evaluation.
For positive temperature, dividing logits by a value below 1 sharpens the distribution and dividing by a value above 1 flattens it. Implementations typically treat temperature 0 as a separate greedy path rather than putting zero into the division formula.
해피큐리오3는 별일이 없다면 구내식당에 간다. 이 루틴은 완벽한 결정론처럼 보이지만, 사실 '별일이 없다'는 조건이 충족되어야만 하는 확률적 사건이다. 기분이나 동료의 제안 같은 변수가 개입하는 순간, 주사위의 눈은 언제든 바뀔 수 있다. 우리 삶에 진짜 결정론은 많지 않다. 해피큐리오3의 일상은 매일 아침 단단하게 기울어진 주사위를 굴려, '루틴'이라는 높은 확률의 결과를 뽑아내는 과정인 셈이다.