Concept · Building with AI

Sampling

Also called: top-p, top p, top-k, top k, nucleus sampling, decoding

How a model chooses each next token from its list of likely options. Settings such as temperature and top-p control how adventurous the choice is.

For example: With top-p sampling, the model picks only among the few words that together make up most of the likelihood, ignoring long-shot words.

Connects to 4

Page last changed · Suggest a correction