The Practitioner's LLM Curriculum ← Week 1 · Sampler Playground
Interactive · Week 1 · Section 4

How a probability distribution becomes text.

A model produces a distribution over the entire vocabulary at every step. Sampling is what turns that distribution into a single chosen token. Move the sliders below to see how temperature, top-k, top-p, and min-p reshape the same distribution — and how the choice of sampler changes what the model says.

Sampler controls
Temperature 1.0
Scale logits by 1/T before softmax. Lower = sharper. T=0 = greedy.
Top-k off
Only sample from the top k tokens. 0 disables.
Top-p (nucleus) 1.00
Sample from smallest set whose cumulative prob ≥ p. Adapts to context.
Min-p off
Reject tokens below p × max_prob. Newer; often better than top-p.

Distribution after sampling

active entropy top prob
Active Original Filtered out

What the model would say

20 samples