When a language model generates text it assigns a probability to every possible next token. Nucleus sampling keeps only the most probable tokens that together reach probability p, then samples among them. If the model is confident, only one or two tokens qualify; if it is uncertain, more do. See our explainer on temperature and sampling.
Temperature and sampling explained: why the same prompt can give different answers
Language models pick each next word from a probability distribution. Learn how temperature, top-k and top-p change it, with a worked numerical example.
thelatentdaily.com Editorial Team5 min read