---
title: A stakeholder insists outputs must be identical because temperature is 0, yet your logs show different answers to the…
url: https://gurkanozkan.ai/learn/questions/applied-llm-fnd-09/
markdown: https://gurkanozkan.ai/learn/questions/applied-llm-fnd-09.md
kind: question
role: Applied LLM
stage: Technical
difficulty: Medium
json: https://gurkanozkan.ai/api/learn/questions/applied-llm-fnd-09.json
robots: noindex
---

# A stakeholder insists outputs must be identical because temperature is 0, yet your logs show different answers to the same prompt. Explain why and say what you would do.

Applied LLM · Technical · Medium

## Answer

*Model answer, written in a candidate's voice*

### In short

- Temperature 0 is greedy, not bitwise deterministic; floating-point reductions are non-associative, so batch size/composition and kernel choice change reduction order and can flip near-tied logits, causing the continuation to diverge.
- Other causes: MoE routing effects, different replicas/hardware, speculative decoding implementations, silent provider model updates, and prompts that are not actually identical (timestamps, retrieved documents, tool outputs).
- Mitigations: pin model snapshots, use seed parameters where offered as best-effort, cache responses for identical inputs, and use batch-invariant kernels if self-hosting.
- Design tests/evals to tolerate variation with semantic/structural checks instead of exact match; determinism is not correctness.

### In full

Temperature 0 makes decoding greedy, but it does not make the system bitwise reproducible: floating-point reductions are not associative, so batch size/composition and kernel choice change the order of arithmetic, near-tied logits can flip, and the continuation diverges. I would first verify the prompts are truly identical—timestamps, retrieved documents, tool outputs, system prompts, and model/version metadata—then check replica, hardware, batching, MoE routing, speculative decoding, and whether the provider silently updated the model. For mitigation I would pin model snapshots, pass seed parameters where offered while treating them as best-effort, cache responses for identical inputs, and use batch-invariant kernels if we self-host. I would also make evals tolerate variation: compare semantic/structural properties and task success rather than exact strings, and treat determinism as a useful debugging aid, not proof of correctness. If the stakeholder needs identical outputs for a contractual or audit reason, I would say so plainly and propose a controlled path—pinned snapshot, fixed batching/kernels, cached responses, and a documented tolerance for residual variation—rather than promise a guarantee the stack cannot honestly provide.

*Checked against sources by an independent AI reviewer.*

## What a strong answer covers

- Floating-point reductions are not associative; results depend on batch size/composition and kernel choice, so near-tied logits can flip and the continuation diverges
- Other sources: MoE routing effects, different replicas/hardware, speculative decoding implementations, silent provider model updates, prompts that differ (timestamps, retrieved documents)
- Mitigations: pin model snapshots, use seed parameters where offered (best-effort), cache responses for identical inputs, batch-invariant kernels if self-hosting
- Design tests and evals to tolerate variation (semantic/structural checks instead of exact match). Determinism ≠ correctness

## Common mistakes

- Blaming only "the seed"
- promising bit-exact reproducibility from a hosted API

## Topic guides

- [Debugging ML and LLM systems](https://gurkanozkan.ai/learn/topics/debugging.md)
- [LLM inference: decoding, batching, quantisation and speculative decoding](https://gurkanozkan.ai/learn/topics/inference.md)
- [Research methodology, taste and reproducibility](https://gurkanozkan.ai/learn/topics/research.md)
---

*Study material compiled with AI: drafted by a local model (Inkling 2 Mini) from public sources, then checked against those sources by independent AI reviewers (Claude) in November 2026. Not reviewed line by line by a person.*
