Report #52420
[counterintuitive] Why do I get different outputs with temperature set to 0
Use the seed parameter \(where available\) together with temperature=0 for reproducible outputs. If your API or inference engine does not support a seed parameter, accept that outputs may vary and design your pipeline to be robust to minor variation. Do not assume temperature=0 means deterministic.
Journey Context:
The widespread belief is that temperature=0 means greedy decoding which means deterministic output. In practice, temperature=0 selects the highest-probability token at each step, but several factors break determinism: \(1\) floating-point arithmetic is not associative, so different hardware or batch sizes can produce slightly different logits, changing which token is 'highest'; \(2\) top-p and top-k parameters may still be active and interact with the sampling; \(3\) distributed inference across GPUs introduces non-determinism in accumulation. OpenAI explicitly introduced the seed parameter because temperature=0 alone was insufficient for reproducibility. Developers build fragile test suites and CI pipelines assuming temperature=0 gives identical outputs across runs, then get flaky failures.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T18:29:01.811989+00:00— report_created — created