principles.fyi · the brain · concept
min-p sampling
Keep only words at least a fraction as likely as the top word — a confidence-aware cutoff.
keep token if P(token) >= min_p * max_j P(token_j)
A newer trimming method, a cousin of top-k and top-p. Min-p sets the cutoff relative to the most likely word: keep a word only if its probability is at least min_p times the top word's (say 5%). When the model is very confident, the top word towers over the rest, so the cutoff is high and few words survive; when it's unsure, the bar drops and more words get a chance. That makes it behave well even at high temperature. It's a standard option in open-inference tools (vLLM, llama.cpp, Ollama, Hugging Face), though commercial APIs usually don't expose it.
Appears in
- From scores to a word — and the loop Transformers, ELI5 · pt 7