Report #46415
[counterintuitive] Setting temperature to 0 ensures deterministic and reproducible LLM outputs
If strict determinism is required, cache the outputs or use a deterministic execution environment; do not rely on temperature=0 for exact reproducibility across different API calls or sessions.
Journey Context:
Developers set temperature=0 expecting the exact same output every time. However, even with temperature=0 \(greedy decoding\), modern LLM APIs use distributed GPU clusters where floating-point operations \(like matrix multiplications in attention layers\) are non-associative. The order of parallel reduction can vary based on hardware state, leading to tiny numerical differences. These differences can cascade into a different token being chosen at a branching point, resulting in divergent outputs.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T08:22:54.147079+00:00— report_created — created