Top-k Sampling
Also known as: top-k decoding
Quick definition
A decoding method that samples the next token from the k highest-probability candidates.
A decoding method that samples the next token from the k highest-probability candidates.
A fixed k caps the number of choices regardless of how concentrated the probability distribution is.
Example: A text generator samples among its 40 most likely next tokens.
Common use cases: Text generation and diversity control.
Examples
- A text generator samples among its 40 most likely next tokens.
Use cases
- Text generation and diversity control.
Frequently asked questions
What is Top-k Sampling?
A decoding method that samples the next token from the k highest-probability candidates.
What should I know about Top-k Sampling?
A fixed k caps the number of choices regardless of how concentrated the probability distribution is.