Educational demo · not a real model

Temperature sampling

Temperature reshapes next-token probability mass before sampling. This demo is illustrative only — it does not call a language model.

Diagram of temperature reshaping next-token probability distributions
Lower temperature concentrates probability; higher temperature flattens it.

Interactive illustration

Toy logits for four candidate tokens — probabilities after softmax with temperature.

    How to read this

    • Temperature near 0 makes the highest-logit token dominate (more deterministic).
    • Temperature near 1 is a common default for many chat products.
    • Temperature above 1 flattens the distribution (more variety, more risk of odd tokens).
    • Products also use top-k / top-p; temperature is only one control.

    Learning hub · Concept map