Large Language Models · Level 2 of 5
Top-p Sampling
Sampling from a smallest high-probability token set whose cumulative mass reaches a threshold.
The candidate set changes with the predicted distribution.
Example
A decoder restricts choices to tokens covering 90 percent of probability mass.
Listen to the definition and example
Audio transcript
Top-p Sampling. Sampling from a smallest high-probability token set whose cumulative mass reaches a threshold. The candidate set changes with the predicted distribution. For example: A decoder restricts choices to tokens covering 90 percent of probability mass.
Explore this concept
Why it matters
This helps you interpret model behavior and control how text is processed or generated.
Start with
Related concepts
Quick recall question
Try answering before looking back at the definition.