Skip to content
Convertto

How Temperature, Top-p and Top-k Reshape a Distribution

Watch sampling parameters change which tokens can actually be chosen, on a real softmax over logits you supply.

Temperature divides the logits before the softmax — below 1 sharpens the distribution, above 1 flattens it, and 0 becomes greedy decoding. Top-p keeps the smallest set of tokens summing to p, top-k keeps a fixed count, and min-p keeps anything above a fraction of the leading token. This visualiser applies them in the order real samplers do and shows exactly which tokens survive.

Runs in your browser
Privacy
Runs entirely in your browser — nothing is uploaded
Cost
Free, unlimited, no sign-up

Frequently asked questions

Should I change temperature or top-p?

One or the other, rarely both — they interact in ways that are hard to reason about. Top-p is generally the better single dial because the set of candidates adapts to how confident the model is, whereas temperature reshapes the whole distribution uniformly.

Does temperature 0 guarantee identical output?

No, and this surprises people. Greedy decoding removes the sampling randomness, but floating-point non-determinism in batched GPU kernels, mixture-of-experts routing and shifting server-side batch composition all mean the same prompt can still produce different text.

Why do some models reject these parameters now?

Several current frontier models removed temperature, top-p and top-k entirely — sending them returns an error. The reasoning is that adaptive thinking and prompting give better control than distribution reshaping. Local models and older APIs still use everything shown here.

How to use the temperature & top-p visualizer

  1. 1Enter or paste your logits.
  2. 2Set the temperature.
  3. 3Set the top-p (nucleus).
  4. 4Set the top-k.
  5. 5Set the min-p.
  6. 6Set the repetition penalty.
  7. 7The result appears immediately — copy or download it.

Sources & specifications

Embed this tool

Put the working temperature & top-p visualizer on your own site. It runs in your visitors' browsers exactly as it does here — free, no account, nothing uploaded.

Share this tool

Last updated

More ai & llm tools