What is min_p sampling in AI roleplay?
Updated
min_p is a sampler setting that filters out unlikely next words relative to the model's top choice. With min_p 0.05, any token less than 5% as likely as the most likely token is removed before one is picked. Because the cut scales with the model's confidence, it trims nonsense while leaving room for variety, which is why many roleplayers pair it with a higher temperature.
Try it now, free, no account neededStart a story with FizzYour downstairs neighbour builds bombs. Lots of them.How the cut-off works
At each step the model gives every possible next token a probability. min_p multiplies the top probability by the min_p value and drops every token below that line. A worked example with min_p 0.1:
- The model is confident: the top token has 80%. The line is 8%, so only a few strong candidates survive.
- The model is unsure: the top token has 20%. The line is 2%, so many reasonable options survive.
That is the advantage over a fixed cut such as top_k (keep the 40 best) or top_p (keep tokens until their probabilities add up to 0.9): min_p narrows choices when the answer is obvious and widens them when many words would fit.
Typical values
- 0: off.
- 0.02 to 0.05: light filtering, lots of variety.
- 0.05 to 0.1: a common roleplay range.
- 0.2 and up: strict, replies get safer and more repetitive.
In an API request it looks like "min_p": 0.05. It is usually combined with temperature, while top_p is left at 1 and top_k off so they do not fight each other.
Why it pairs with temperature
High temperature makes rare words likelier, including bad ones. min_p removes the worst of them first. So temperature 1.1 with min_p 0.05 can give lively, surprising replies from a chaotic character like Fizz or Brix without the odd broken word that 1.1 alone sometimes produces. The order in which an app applies samplers can matter; SillyTavern lets you see and change it.
Common mistakes
- Stacking min_p with tight top_p and top_k. Three filters at once can make replies flat.
- Setting min_p very high to stop repetition. It makes repetition more likely, because only the top few words survive.
- Assuming every service supports it. Some APIs ignore min_p; check the provider's documentation.
min_p in UnsavedAI and other apps
UnsavedAI's API accepts min_p from 0 to 1 and passes it to the model, along with temperature, top_p, top_k and repetition penalty. SillyTavern shows it in the sampler panel. The UnsavedAI website chooses samplers for you, so you only need this when you connect an app with an API key from /setup. See roleplay sampler settings for full presets.
Questions people ask
Is min_p better than top_p?
Many roleplayers prefer it because it adapts to how confident the model is. Use one main filter rather than several.
What should I set min_p to?
Start at 0.05 with temperature around 1.0, then adjust in small steps while swiping to compare.

