Click any words you think contain an error. Click again to unmark.
Temperature divides logits before softmax: low T sharpens (deterministic), T=1 leaves the distribution unchanged, high T flattens (more random). The passage inverts every claim.
Imagine a bag of marbles, one for each word the model could say next. Some marbles are bigger (the model likes those words more) and some are smaller. The model reaches in without looking and pulls one out. Bigger marbles get picked more often. Temperature is a magic dial. Turn it down low, and the big marbles grow huge while the small ones shrink to almost nothing. You almost always pull the same big marble, so the model says the safe, predictable word every time. Turn it up high, and all the marbles become roughly the same size. Now any word can come out, so the model gets creative and surprising, but sometimes weird. Set it in the middle, and the bag stays exactly as the model packed it.
Detailed answer & concept explanation~6 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
3 min: softmax with T formula + direction (low sharpens, high flattens) + T=0 versus greedy + interaction with top-p + use cases (code low, creative high).
Real products, models, and research that use this idea.
- OpenAI API defaults to T=1 for chat completions; cookbook recipes for code generation explicitly drop to T=0 or 0.2.
- Anthropic Messages API documentation recommends T=0 for deterministic tasks and notes that Claude's calibrated distribution is at T=1.
- vLLM and SGLang expose temperature as a per-request sampling parameter alongside top-p and top-k.
- GitHub Copilot uses very low temperature plus top-p for code completion to maximise stability.
- Hugging Face TGI exposes temperature in the same `SamplingParams` block as top-p, top-k, and repetition penalty.
What an interviewer would ask next. Try answering before peeking at the approach.
QWhat's the difference between T=0 and 'greedy decoding'?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Inverting the direction: claiming low temperature is creative and high temperature is deterministic. The opposite is true, low T sharpens the softmax toward argmax.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.