top-P
Top-P is a text generation setting that has a language model pick the next token only from the most likely candidates whose combined probability reaches a set value.
Top-P, also called nucleus sampling, is a generation setting for language models. The model ranks candidate next tokens by probability and chooses only among the top candidates whose probabilities add up to the top-P value. Lower values make output more conservative and consistent, while higher values make it more varied.
It is often used together with temperature, which controls randomness. Temperature flattens or sharpens the whole probability distribution, whereas top-P cuts off the range of candidates the model may choose from.
This entry is based on AIPOST articles and widely known facts. If something is wrong, please send us a correction request.