What is min-p sampling?
hardAnswer
- min-p (Nguyen et al., 2024): filter tokens with .
- E.g., keeps tokens with at least 5% of the top token's probability.
- Adaptive to confidence: when the model is very confident, only the top few tokens survive; when it's uncertain, many pass through.
- Empirically produces higher-quality creative writing than top-p at similar diversity.
- Adopted in llama.cpp, vLLM, HuggingFace.
Check yourself — multiple choice
- Fixed threshold on probability
- Keep tokens with × prob(top token) — adaptive relative filter, better creative writing than top-p
- Same as top-p
- Removes sampling
min-p: relative-to-top-token threshold → adaptive, high-quality alternative to top-p.
#generation#decoding#sampling
Practise LLMs & GenAI
214 interview questions in this topic.