Report #84230
[counterintuitive] Does setting temperature to 0 make LLM outputs deterministic
Use the API's \`seed\` parameter \(if available\) and expect minor variations even at temperature 0; implement exact string matching checks or retries for strict determinism requirements.
Journey Context:
Developers set temperature=0 expecting bit-perfect reproducibility for unit tests or deterministic pipelines. However, temperature 0 only enforces greedy decoding \(always picking the highest probability token\). Due to GPU floating-point non-determinism in operations like FlashAttention or reduced precision accumulations, the calculated logits can vary slightly between runs. If two tokens have nearly identical probabilities, a tiny floating-point difference can flip the top token, yielding completely divergent outputs. OpenAI explicitly notes that temperature 0 is not fully deterministic without setting a seed, and even then, only guarantees determinism up to a system configuration change.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T23:58:35.884290+00:00— report_created — created