A generator rolls dice for the next word. Today you grab the dial that decides how loaded those dice are. Low = safe and boring. High = wild and surprising. Crank it too far and it melts into gibberish. Same model — totally different vibe.
The AI is about to pick the next word after "The dragon breathed…". Each bar is how likely a word is. Drag the temperature dial: low makes the top bar tower over everything (it always picks the favourite), high flattens the bars so anything can win. Hit Sample to actually roll it!
temperature
The dial reshapes every probability with p(1/T), then re-balances them to add up to 100%. That's the real temperature math, running live. 🔢
Same word-picker, cranked to the edges. Freeze it (temperature near 0) and it gets stuck repeating its one favourite word — a boring loop. Boil it (temperature maxed) and it grabs random junk — pure nonsense. Tap both and read the line it writes.
The bars above were the mechanic. This is a real language model (SmolLM2) running 100% on your machine. Give it the same prompt, then generate at a low, medium, and high temperature — same model, three different personalities. This is the exact dial that lives inside ChatGPT.
First load downloads the model from Hugging Face, then it's cached for offline use. On a 4GB laptop give it a minute. ☕
Three lines, three temperatures. One is stuck in a boring loop, one is balanced, one is total chaos. For each line, tap the temperature that must have written it. Match all three to win the badge!
Once you know temperature, you'll spot it hiding in every creative AI tool — sometimes under a friendlier name:
APIs literally take a temperature number. Low for facts & code, higher for brainstorming and jokes.
Dials like "creativity", "chaos", or guidance/CFG do the same job — how tightly it sticks to the safe choice.
Real teams mix temperature + top-k + top-p together to shape the exact flavour they want.
You found the weirdness dial: temperature. Low is safe and can loop; high is wild and can melt into gibberish; the magic lives in the middle. You even turned it on a real model. Now you can tune any generator's personality on purpose.