vibedonaldsvibedonalds.com
Term

Top-p

Nucleus sampling — an alternative to temperature that restricts sampling to the smallest set of tokens whose cumulative probability reaches p. Top-p=0.9 keeps only the top 90 % probability mass and resamples from that subset.

Background

Top-p is sometimes used in combination with or instead of temperature. The effect is to cap the model's randomness adaptively: when the model is confident, the nucleus is small; when uncertain, it widens. Most applications use either temperature OR top-p, not both. Coding tasks default to low temperature; chat applications often combine T=0.7 with top-p=0.9.