Evening-Truth

Samplers with a hint of squirrel

Back to LLM 101

Samplers explained without tech speech 😘

The deeper you dive into AI and LLM the more technical bits and pieces you will find.
Samplers are one of them and googling them often ends up with a very technical explanation that leaves you with more questions than you had before.
Especially the question "Why did I bother googling that in the first place?"

You feel that, right?
Come in, love.
Pick a plushy, make yourself cozy, and let me explain it without messing up your synapses.

What are Samplers?

Samplers are control rods that decide how the AI chooses its words/tokens while generating a reply for you.
They all work together but to keep it simple, I'll just explain what they do.

We'll be talking about the most important ones.

  • Temperature
  • Top P
  • Top K

Temperature

The metaphor:

You hire a writer (AI) to create a text for you. With Temperature you control how creative the writer is. How much they are allowed to stray from the next obvious word choice.
The lower you set the Temperature, the less creative the writer will be.

Low (0.1 - 0.5):
The overly careful writer that only uses the most obvious words.
This is mostly used for coding and factual tasks. Not useful for roleplay and creative writing.

  • Only the most likely and statistically safest words are picked.
  • You try to fix the deliciously broken Biker-bot but they wont let you? Set the Temperature higher.

Medium (0.7 - 1.1):
The creative writer with a script.
Allows for creative ideas without forgetting the initial task.

  • The sweet spot for most modern AIs to write creative and in character. But also highly depending on the model.
  • Deepseek, Qwen and Mistral can mostly handle up to 1.1. GLM, Kimi K2 and many other LLMs start to hallucinate wildly at 1.0

High (1.2 - 2.0):
The writer that's high on hallucinogens or the WTF Setting.
The AI will be highly creative and picks even the most unlikely/risky words

  • Ever seen random Kanji or Sanskrit letters in the replies? The sexy secretary was just abducted by a horde of squirrels in space suits? Yeah... lower the Temperature.

Top P

Controls the pool of words the AI can choose from. This also has an influence on the creativity of the AI.

The metaphor:

The writer you hired knows every word there is. They look at all the words that make sense in the given context (adding up to the value you set) and ignore the absolute nonsense. In clear situations, the list is short; in vague ones, it's long.

1.0 (or 100%):
No filter. The writer considers every possible word in its dictionary.

  • The model uses words that feel strangely scientific? Or the replies contain words that were common in the Victorian era, but you are currently in space with a leaking oxygen tank?
    Lower Top P!

0.99 to 0.95 (or 99 to 95%):
The standard for roleplay and creative writing. It cuts out the bottom 1% to 5% of "junk" words that make no sense, but keeps the variety.

0.8 and below (or 80% and below):
High filter.

  • The bot describes the eye color of the character as "blue like a storm over the ocean" or repeats the example dialogue verbatim, every damn time?
  • Your roleplay has the immersion of a tax slip?
    **Turn up Top P! **

Top K

A "Hard Limit" on word choices. **This Sampler is highly restrictive! **

We don't like it... say it with me... "WE DON'T LIKE TOP K."
Well done, Baby. That's a good boy/girl/pet right there. ;-)

The metaphor:

You tell your writer to ONLY pick from the top 10 most obvious words for the current sentence.

10 to 100:

The AI will ignore any word under that value.
The lower the setting the more restrictive. That perfect, unique word you'd want to read. Yeah... that's outside the Top K you set.

  • The AI turns your wholesome neighbour bot into a growling, territorial werewolf?
  • You get replies that read like the AO3 post with a low rating?
  • ClichΓ© phrases like "their words hit like a physical blow.", "You are mine. And I don't share what's mine.", "Shivers running down spines", "The scent of ozone.".
    That's Top K and why we do not like it. πŸ˜‰
    We want our Companions to write freely and creatively. So we disable Top K or at least choose the highest possible setting.

Interesting facts

  • Z.ai models default to Top P 0.6 when you give it any restrictive Samplers.
  • Older AI architectures needed this to not go berserk.

Other Samplers

There are a lot of them. Here's an overview just so you know they exist... forgetting them is highly encouraged. We don't need them as long as you're not in Computer Science.

  • Dynamic Temperature
  • XTC
  • DRY Sampling
  • Smoothing Factor and Curve
  • CFG Scale
  • Min P / Typical P
  • Top A
  • Mirostat Tau / Mirostat Learning Rate
  • ETA Cutoff
  • Epsilon Cutoff
  • Squirrel Enhancer
    Β 

Β 
Now take a break you wonderful menace!
Drink some water or touch grass. You did good!

Back to LLM 101

Edit

Pub: 21 Oct 2026 14:29 UTC

Edit: 21 Oct 2026 15:31 UTC

Views: 295