Multinomial sampling chooses the next token randomly from the model’s probability distribution rather than always selecting the highest-probability token. In generation, this can encourage more exploration and creativity than argmax, while temperature, top_k, and top_p constrain the candidates. section 9.1.2
Comparing decoding choices
Generate several continuations from the same prompt, then compare top_k versus top_p with multinomial sampling and argmax versus multinomial sampling. The exercise makes the trade-off between deterministic selection and exploratory output concrete. section 9.1.2
