CARD NEWS · Prompts & AI use

Top-p · 4 cards

Four cards for social posts, teaching materials and presentations. Capture the screen or print to a PDF.

1/4
Prompts & AI use

Top-p

Top-p, also called nucleus sampling, is a sampling setting for large language models (LLMs). When the model picks its next token, it keeps only the most likely candidates whose combined probability reaches a threshold p, and samples from that group.[1][6] With top_p = 0.1, for example, only the tokens that make up the top 10% of the probability mass are considered.[2]

2/4
In simple terms

An easy way to understand

An LLM writes one token (a word, part of a word, or another text unit) at a time. For each step it has a ranked list of possible next words, each with a probability.

3/4
Where it is used

Who uses it, and when?

[2] For teams, this means testing one setting at a time so that any change in output can be traced to a single cause. [4] Code that hard-codes a custom top_p therefore needs to be checked before switching models.

4/4
Learn more

ai.rookienote.com
/en/term/top-p

RookieNote
← Read the full entry

Capture these cards or print them to a PDF.