Report #22364
[counterintuitive] Setting temperature to 0 makes LLM output deterministic
Use the seed parameter alongside temperature=0 for near-deterministic outputs. Cache and replay outputs for exact reproducibility. Never rely on temperature=0 alone for deterministic behavior in tests or CI pipelines.
Journey Context:
Temperature=0 selects the highest-probability token at each step, but this doesn't guarantee determinism. GPU floating-point operations use non-deterministic parallel reduction orders, producing slightly different logits across runs. Batched inference changes computation paths. Ties in probability produce arbitrary selections. OpenAI introduced the seed parameter specifically to address this, documenting it as best-effort determinism. Many developers waste hours debugging flaky tests at temp=0 before discovering this fundamental property of GPU computation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T15:57:00.094084+00:00— report_created — created