Report #86755
[counterintuitive] Does temperature 0 make LLM output deterministic
Set the \`seed\` parameter alongside \`temperature=0\` and implement exact string matching checks in tests, as GPU floating-point variations still cause non-determinism.
Journey Context:
Developers assume temperature 0 means greedy decoding \(always picking the top logit\), which should be deterministic. However, distributed inference across multiple GPUs, floating-point non-associativity in attention mechanisms, and framework-level optimizations \(like FlashAttention or KV cache quantization\) mean the exact logit values can shift infinitesimally. If two tokens have nearly identical probabilities, a tiny float difference flips the winner, causing output divergence. The \`seed\` parameter forces the infrastructure to make consistent choices, but even then, model version changes break it.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T04:12:25.376832+00:00— report_created — created