Skip to content
All learning

Lab 03 · Fundamentals

Temperature & top-p sampler

Drag temperature and top-p, then sample next words and watch the distribution move.

The question

live

What do temperature and top-p actually do to the next word?

Booting sandbox…

Edits save to this browser only. Press ⌘/Ctrl + Enter to re-run, Reset to restore the original.

What building it taught me

  • Temperature → 0 collapses toward the single most likely word.
  • Top-p removes the long tail entirely, which is why it tames high temperature.
  • Sampling 50× makes randomness visible in a way one output never does.

Related notes