Top-p sampling, also called nucleus sampling, is a stochastic decoding strategy used to generate sequences from autoregressive probabilistic models such as large language models. At each step the model gives a probability to every possible next token. The method sorts these tokens by probability, keeps the smallest set whose cumulative probability exceeds a chosen threshold p, rescales the probabilities inside that set so they sum to one, and then draws the next token at random from it. Because the size of this set shrinks when the model is confident and grows when it is uncertain, the technique adapts to the situation and is more flexible than top-k sampling, which always draws from a fixed number of candidates. It was originally proposed by Ari Holtzman, Yejin Choi and colleagues in 2019 to reduce the repetitive and nonsensical text that deterministic methods such as beam search tend to produce, and it has since spread to protein engineering, drug design and geophysical denoising.
Facts
Deterministic or Randomised Problem SolvedRepetitive and nonsensical text from deterministic decoding methods such as beam search 1 Connections
Credited To
Source Top-p sampling (Wikipedia)
In Field
Source Top-p sampling (Wikipedia)
Invented
Source Top-p sampling (Wikipedia)
Uses Design Technique
Source Top-p sampling (Wikipedia)
Sources
1. Top-p sampling (Wikipedia)
Lead
Top-p sampling, also known as nucleus sampling, is a stochastic decoding strategy for generating sequences from autoregressive probabilistic models
Lead, purpose
to address the issue of repetitive and nonsensical text generated by other common decoding methods like beam search
Invented: Yejin Choi, Lead, origin
It was originally proposed by Ari Holtzman, Yejin Choi and colleagues in 2019
Credited To: Yejin Choi, Lead, credit
It was originally proposed by Ari Holtzman, Yejin Choi and colleagues in 2019
In Field: Natural Language Processing, Lead, domain
originally proposed by Ari Holtzman, Yejin Choi and colleagues in 2019 for natural language generation
Uses Design Technique: Randomized Algorithms, Technique section
Top-p sampling introduces randomness to avoid these issues while maintaining quality.
In Group: Probabilistic Inference and Sampling Algorithms, Lead, stochastic sampling
is a stochastic decoding strategy for generating sequences from autoregressive probabilistic models
View the SourceReader Challenges (0)
No disputes yet. Spotted an error or a better source? Open the first one.
Sign in to dispute this or suggest a correction.