← Ashish's notebook/How Top-P Sampling Works in LLMs
Notebook

How Top-P Sampling Works in LLMs

Top-K keeps a fixed number of words every time. Top-P keeps fewer when the model is sure and more when it isn't.

18 SEP 2026