Skip to content
Tokens & temperature · Lesson 6 of 8

Temperature & randomness

bits~/tokens-and-temperaturelesson 6/8 · 0% →
◆ tutor
Last lesson you saw that a model never picks “the” next word. It gives every possible token a probability, then rolls a weighted die. Temperature reshapes those odds before the roll. Low temperature sharpens them — the favourite almost always wins. High temperature flattens them — long shots get a real chance. Drag it and watch.

odds --temperature 0.70 "Moon café tagline: “___"

Brew ███████████████········· 61%
One █████··················· 22%
Lunar ███····················· 11%
Fly █······················· 4%
Zero ························ 2%
Balanced: plausible variety. Most chat apps live around here.
◆ tutor
Your turn. Write a prompt that asks for a tagline for a coffee shop on the moon with a length limit. Run it once at 0, then a few times at 1.0, and compare.
◆ tutor
Write the prompt yourself — no pasting the answer. Type it below: ↵ runs it, and the checks tick as you go.
  • Asks for a tagline, not yet
  • Coffee + moon, not yet
  • Sets a length limit, not yet
  • Ran at 0 and 1.0, not yet
run at

Turn on JavaScript to run prompts.