Moyan AI Training Institution LogoMoyan AI

Practice · Foundational · Beginner

Temperature

A sampling setting that controls how random a model's token choices are.

What Temperature is

Low temperature makes output focused and repeatable; high temperature increases variety and the chance of drift or error.

How it works

Temperature rescales the logits before sampling. Near zero the model almost always picks the highest-probability token. Top-p and top-k truncate the candidate pool as complementary controls.

Why it matters

Getting this wrong is a common cause of unreliable production behaviour: extraction and classification want near-zero, brainstorming wants higher.

Common uses

  • Deterministic extraction at low temperature
  • Creative ideation at higher values
  • Diverse sampling for self-consistency

Strengths

  • Simple, immediate control over variability

Watch for

  • High values increase hallucination
  • Zero is still not fully deterministic in practice

Continue exploring

More in this collection

Browse all AI Concepts