Inference and generation

Top-p sampling

stable definition

Definition

A decoding method that samples only from the smallest set of candidate tokens whose cumulative probability reaches a chosen threshold.

Distinguish it from nearby terms

Top-p limits the candidate probability mass; temperature reshapes the relative probabilities.

Check your understanding

Changing both at once makes it harder to attribute behavior changes.

Also called

nucleus sampling

Factory areas

Public evidence