# 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.

**URL:** https://convertto.tech/t/temperature-top-p-visualizer
**Category:** AI & LLM Tools (https://convertto.tech/c/ai-tools)
**Privacy:** Runs entirely in the browser; no upload
**Cost:** Free, no sign-up
**Last updated:** 2026-08-01

## Key facts

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

## How to use

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

## FAQ

### 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.

## Sources

- [The Curious Case of Neural Text Degeneration (nucleus sampling)](https://arxiv.org/abs/1904.09751) — arXiv

## Related tools

- [AI API Cost Calculator](https://convertto.tech/t/ai-api-cost-calculator): Work out what a prompt costs per call, per day and per month, and compare the same workload across every major model.
- [Context Window Calculator](https://convertto.tech/t/context-window-calculator): Paste a document and see which models it fits inside, how much of each window it fills, and what is left for the reply.
- [LLM Model Comparison](https://convertto.tech/t/llm-model-comparison): Every current model side by side: price per million tokens, context window, max output, modalities and cache rates.
- [LLM Stream Parser](https://convertto.tech/t/llm-stream-parser): Paste a raw server-sent-event stream and get the reconstructed message, tool calls, usage and stop reason.
- [LLM Token Counter](https://convertto.tech/t/llm-token-counter): Count tokens with the real BPE vocabulary, see every token coloured in place, and compare the count across models.
- [Prompt Injection Sanitizer](https://convertto.tech/t/prompt-injection-sanitizer): Strip invisible carriers, neutralise instruction-like markup and fence untrusted content before you paste it into a prompt.
- [Prompt Template Generator](https://convertto.tech/t/prompt-template-generator): Write a prompt once with placeholders, paste rows of data, and get every filled prompt back with its token count and cost.
- [Temperature Converter](https://convertto.tech/t/temperature-converter): Convert temperature between 5 units with the formula, a reverse conversion and a quick-reference table.
