BeginnerAbout 15 min
Sampling & Decoding Parameters
Read the full article on Substack
6 min read.
Reshape a real next-token distribution with temperature, cut its tail with top-k or top-p, then sample repeatedly to feel how the knobs trade determinism for diversity — and why T=0 still isn't fully reproducible.
“The capital of France is ___”
T = 1.00
Paris
73.1%
the
9.9%
located
6.0%
Lyon
4.4%
a
3.6%
Marseille
3.0%
Top token 73%. Entropy 1.43 bits.
Check your understanding
Answer from memory before you scroll back up. Pulling an idea out of your head is what makes it stay there.
What each decoding knob actually does
Sort
Sort each parameter by how it changes the next-token choice.
Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.
Reshapes the probabilities
Drop items hereCuts candidates out
Drop items here6 pieces left to place
Quiz
20 questionsQuestion 1 of 20
Score: 0
Where does temperature apply in the decoding pipeline?
Done with this lesson?
Sign in free to keep your progress, streak and quiz scores.