An LLM at temperature 0 is not deterministic. Temperature 0 makes the model take its highest-scoring token at every step, but on a shared inference server those scores shift slightly with the number of other requests in the same batch. The same prompt can then come back with a different token on top, and from there a different completion.
Key facts
Definition
Temperature 0 makes an LLM take its top-scoring token at each step, and on a shared server the batch around a request can change which token is on top, so the output is not deterministic.
How Bigcircle does it
- Bigcircle runs a sum, a date, a permission, a threshold and the structure of a plan in code, because sampling again cannot make a single right answer more correct.
- Bigcircle records the model id, the serving build, the prompt version and every tool result, and a replay feeds the recorded tool result back instead of calling the live tool.
- Bigcircle reports a pass rate across repeat runs for a quality case, and requires every repeat to pass before a safety case ships.
Comparison
Claude Opus 5.5 rejects a request that sends temperature and Gemini 3.6 Flash ignores the field, while OpenAI's Chat Completions still accepts temperature and marks its seed parameter deprecated.
Key number
A temperature-zero run of 1000 completions on Qwen3-235B produced 80 unique outputs, and all 1000 matched once batch-invariant kernels were enabled.
As of October 2026 two providers have taken the setting away on their newest models: Claude Opus 5.5 rejects a request that sends temperature, and Gemini 3.6 Flash and newer ignore it. An agent becomes repeatable when the steps with one right answer run in code, and the inputs to every model call are recorded so a run can be replayed. Repeats are then judged on the state the agent leaves behind.
| Criterion | Left to the model | Moved into code | A typed judgment, recorded |
|---|---|---|---|
| Which step belongs here | Wording a reviewer would accept in more than one form | A sum, a date, a permission, a threshold, the structure of a plan | A judgment with a short list of answers, such as which reporting framework a disclosure maps to |
| What a second run can do | Return different wording, which a pass rate can absorb | Nothing, if the inputs are the same | Return a different label, unless the first answer is stored with the version that produced it |
| What has to be recorded | Model id, serving build, prompt version, tool results | Code version and inputs | The question, the answer, and the rule or model version that applied it |
| How Bigcircle handles this | On Skionis the model still writes the infrastructure template, and a validation loop checks every version before AWS is asked to apply it | Skionis turns a free-form request into a structured spec and an explicit chain of tool calls before a template is written | DocVerse maps disclosures to frameworks with classifiers plus rules, and stores which mapping version was applied |
The problem shaped Skionis, the DevOps agent we built on a live AWS account. Its build notes list drift among the ways a raw model fails at infrastructure templates. Asked twice for the same change, it writes two different templates, and a reviewer cannot learn to trust output that never has the same shape.
This guide covers why the top token moves, how much that matters for an agent, and what each provider promises as of October 2026. Most of it is about what we do instead. We define a repeatable run by its result, take the steps with one right answer out of the model, record what a replay needs, and set how many repeats have to pass.
Why is temperature 0 not deterministic?
At each step the model gives every token in its vocabulary a score, the logprobs. Temperature controls how the next token is drawn from those scores, and at zero the draw always takes the highest one. Two calls return the same token only while the same token stays on top. When two candidates score almost the same, a change in the last decimal places is enough to swap them, and every later step then reads a different prefix.
The common explanation, that GPUs add numbers in an unpredictable order, is incomplete, and acting on it sends a team after the wrong fix. Floating-point addition does give slightly different results in different orders, but a GPU repeats the same order for the same job. In the measurement the next section draws on, the same matrix multiplication run 1000 times came back bitwise identical every time. Pinning the hardware or the arithmetic does not make two calls match.
The batch is the input that changes between two calls. The server groups whatever requests arrive together, and the GPU routines that do the arithmetic, called kernels, split their sums differently depending on how large that group is. How LLM inference works covers why servers build that batch in the first place.
The property those kernels lack is batch invariance. Under continuous batching the scheduler rebuilds the batch as requests finish and new ones join, so its size follows the load on the server. The caller cannot see or choose the other requests in it. So we treat every hosted endpoint as nondeterministic whatever the temperature, and design the agent around that rather than around a setting.
The figure below draws that fork, and the next section gives the measured counts.
How large is the effect in a published run?
The size of the effect matters less than where the split falls, and that is the part we design for. The clearest measurement is from Thinking Machines Lab, published on 10 September 2025. Horace He and colleagues showed that the batch, not the arithmetic, moves the top token.
They sent the prompt "Tell me about Richard Feynman" 1000 times to Qwen3-235B-A22B-Instruct-2507 at temperature zero, each completion up to 1000 tokens long. They got 80 unique completions, and the most common one appeared 78 times. Every completion matched for the first 102 tokens. At token 103, 992 of them continued "Queens, New York" and 8 continued "New York City". With batch-invariant kernels switched on, all 1000 completions were identical.
That split fell between two correct ways of naming one place, which a reader would never notice. In an agent the same kind of near-tie can fall on a tool argument or the name of the next step to run, and then the two runs do different things. We plan for the near-tie that falls on an action, because a sentence that varies costs nothing and a tool call that varies changes the system.
The fix costs throughput, so it is not the first one to reach for. On the authors' single-GPU setup serving Qwen3-8B, 1000 sequences took 26 seconds on default vLLM. With batch-invariant kernels they took 55 seconds, and 42 after an improved attention kernel.
Do OpenAI, Anthropic and Google promise deterministic output?
Do not design around a provider's promise of identical output, because none of the hosted APIs makes one. Two of them have removed the setting this question is usually about. We checked each provider's own documentation on 22 October 2026. The last two rows are open-source serving engines that a team runs on its own GPUs.
| Where the model runs | Setting | Documentation as of 22 October 2026 |
|---|---|---|
| OpenAI Chat Completions | seed | Marked deprecated and beta in OpenAI's API specification. The system makes "a best effort to sample deterministically", "determinism is not guaranteed", and system_fingerprint shows when the backend changed |
| OpenAI Responses API | None | The specification lists no seed parameter |
| Claude Opus 5.5 | None | Anthropic's migration guide: omit temperature, top_p and top_k, which now return a 400 error. Temperature zero "never guaranteed identical outputs on prior models" |
| Gemini API | seed | Temperature "is no longer supported and is silently ignored on Gemini 3.6 Flash and newer models". The seed field carries no promise about repeated output |
| vLLM, self-hosted | VLLM_BATCH_INVARIANT=1 | In beta, on NVIDIA GPUs of compute capability 8.0 and up, three AMD Instinct generations and Intel XPUs, with a caveat for some multi-GPU setups |
| SGLang, self-hosted | --enable-deterministic-inference | Supported with three of its attention implementations: FlashInfer, FlashAttention 3 and Triton |
Our reading is that a team calling a hosted frontier model cannot buy token-level repeatability. It can get it only by serving an open model itself with batch-invariant kernels, and paying the throughput cost above. On a hosted model, repeatability has to be built around the model rather than requested from it.
Why do matching tokens still leave an agent unrepeatable?
Batch-invariant kernels make the tokens repeat for the same input, and an agent's input does not stay the same. It reads tool results, the clock, a fetched page and the current state of the system it acts on, and any of those can differ on the second run. The model then treats that difference as a new fact, correctly, and the run goes another way.
We see this on Skionis, the DevOps agent we built that plans and applies infrastructure on a live AWS account. Its remaining failures are provider and state failures, not generation failures. A quota moves between plan and apply, or a resource the plan depends on changes after the agent read the account. Rerunning the same request against the live account later is a different test, however stable the model's output is.
So we define a repeatable run by its result. Given the same recorded inputs, the agent takes the same allowed actions and leaves the same checked state in the target system. Token-level determinism helps with that, but it is neither necessary nor enough, and the rest of this guide covers what the run needs instead.
Which steps do we take out of the model?
Any step with one right answer runs in code. A total, a date, a permission or a threshold does not get more correct by being sampled again. A model asked to add up an invoice can return a different total on the next call, and the ledger keeps whichever one that call produced. Add the numbers in code and hand the model the result.
The structure of a plan can come out too. The Skionis build notes list drift among the failures of a model asked directly for an infrastructure template: ask twice, get two different templates for the same request, which makes review meaningless.
The fix was to turn the free-form request into a structured spec and an explicit chain of tool calls before any template is written. The build notes put the reason plainly: "a reviewer can only build judgement about output whose shape is stable." The model still writes the template. A validation loop of structural and semantic checks catches what varies, and an engineer approves a diagram of the result before anything is applied.
A judgment with a short list of answers can be made by rules and a classifier and then stored. In the ESG filings system we built for DocVerse, disclosures are mapped to frameworks such as GRI and CSRD through "classifiers plus rule logic", because "the rules encode the parts that are definitional and must not be probabilistic". Each fact records the mapping version that was applied, so a later comparison can tell a real change in a filing from a change in the mapping.
A decision model such as Jev returns a label from a fixed list with a probability attached, and the probability marks the close calls. TypeSafe's consistency cookbook shows it: across repeated calls, the label changed on the 2 of 8 questions where the probabilities were close. Store each answer with the version of the question that produced it, and let a replay reuse the stored answer instead of asking again.
Reuse is the simplest way to get the same answer twice. Prospex, the prospect research engine we run on our own pipeline, uses deterministic typed reasoning loops and a cache-first runtime, so a second run on the same company reuses the stored work instead of reasoning from scratch.
The design reason was trust: "a research tool that gives two different reads of one company across two runs will not be trusted twice." Across repeated runs on the same company, we see no output drift.
What does a replay need to record?
A rerun is the same test only if it runs on the same system. Record the model id, the serving build where you control it, the prompt version, and the version of any rule or judgment question. On OpenAI's Chat Completions API, the system_fingerprint field names the backend configuration, and it is the nearest thing to a serving build a hosted model gives you. A change to any of those is a different system, and a regression you cannot attribute to one of them will be chased in the wrong place.
Record every tool result too, and feed the recorded result back on replay instead of calling the live tool again. Call the live tool only when you are testing the tool itself.
Store the outcome the code applied and the code version that applied it. On Skionis one record links the request, the account facts read before planning, the generated template, every validation failure and its revision, the provider's response, the retries and the resources that resulted. With that record, a run can be read back step by step after the fact. A log that keeps only the final answer cannot tell a batch change from a prompt edit. How to build an AI audit trail covers keeping the evidence version that was in force when the run decided.
Guardrails on spending, tools and permissions stay in code during a replay. A replay that sends a payment because the log shows the model asked for one has made a second payment. The recorded tool result goes back into the loop, and the live side effect stays behind the same check it passed the first time.
How many repeats have to pass?
Run the same case several times against the recorded inputs and the pinned versions, and count how often the checked state matches. One passing run may be the batch that happened to agree. The drift moves scores as well as wording: across five models and eight tasks, run ten times each at settings meant to be deterministic, accuracy varied by up to 15% between runs (Atil et al., revised April 2025). Evals here means a case set built from failures someone has read, as our guide to LLM evaluation sets out, with the repeat added on top.
On the trademark drafting system we built for Brandiligence, production logging scores the base model and the fine-tuned model on the same inputs, so a regression from a model change shows up as a movement in the score.
A quality case, such as a summary a reviewer would accept in several wordings, ships on its pass rate. No single cutoff fits every product, because the cost of a weak summary differs from one to the next. The person who owns the standard decides what rate they will ship.
A safety case is stricter. A permission check, an irreversible write or a required refusal has to pass on every repeat, because the run that fails is one a customer can hit. Averaging it into a rate hides it among the runs that happened to succeed.
Rerun the set whenever the prompt, the model id, the serving build or a judgment question changes, and again on a schedule. Hosted models change underneath you, and the GPT-4o deprecation and how to migrate a production model covers the order to follow when the replacement has a new id. Test under realistic load as well. The batch effect depends on how busy the server is, so a quiet afternoon is a different test from the traffic your users share.
When is exact repeatability worth paying for?
Most products do not need exact repeatability. If the output is a draft a person reads and edits before it goes anywhere, varied wording is harmless and a pass rate on the wording is enough.
Serving your own model with batch-invariant kernels is worth its throughput cost only when you need to reproduce a past completion exactly, for example to debug a single bad run or to keep training and inference numerically identical. If you call a hosted frontier model, that option does not exist, and the work belongs in code, in the replay log and in the repeat count.
Common questions
Is an LLM deterministic at temperature 0?#
No. Temperature 0 only makes the model take its top-scoring token, and that token can change when the request shares the server with a different set of other requests. In one published test, 1000 identical requests gave 80 different completions. An agent is repeatable when the same recorded inputs produce the same allowed actions and the same checked state. That takes code for the steps with one right answer, a replay log, pinned versions and repeat runs.
Why do two temperature-zero calls return different text?#
The server batches requests together, and most GPU code splits its sums differently as the batch size changes. The scores for one request then shift slightly, enough to swap two tokens that scored almost the same. The batch size follows the load on the server, which the caller cannot see or control, so two identical prompts were not the same computation.
Can I still set temperature zero on Claude, Gemini and OpenAI models?#
It depends on the model, as of October 2026. Anthropic's migration guide for Claude Opus 5.5 says to omit temperature, top_p and top_k, and a request that sends them gets a 400 error. Google says temperature is silently ignored on Gemini 3.6 Flash and newer models. OpenAI's Chat Completions API still accepts temperature, and its seed parameter is marked deprecated, with determinism described as best effort and not guaranteed.
Does the OpenAI seed parameter make output deterministic?#
No. As of October 2026 OpenAI's API specification marks seed on Chat Completions as deprecated and in beta. It promises a best effort to sample deterministically, says determinism is not guaranteed, and points to system_fingerprint as the way to see when the backend changed. The Responses API lists no seed at all, so a repeatable run has to come from recorded inputs and checks.
Do batch-invariant kernels solve the problem?#
They make the tokens repeat for the same input on a server you run yourself. In the Thinking Machines test, 1000 temperature-zero completions went from 80 unique outputs to one, at a throughput cost. An agent still reads tool results, the clock and live system state, and those can differ between runs, so the kernels do not replace code checks, a replay log or repeat runs.
What should stay out of the model?#
Sums, dates, permissions, thresholds and the structure of a plan run in code, because a second sample can only produce a second answer where one is right. A judgment with a short list of answers can be made by rules or a classifier and stored with its version. Wording a reviewer would accept in several forms can stay with the model and be scored as a pass rate.
How many repeat runs have to pass before an agent ships?#
For a quality case, report the pass rate across repeats and let the owner of the standard decide whether to ship it. For a safety case, such as a permission check, an irreversible write or a required refusal, every repeat has to pass, and one failure fails the suite.
Further reading
- Horace He and Thinking Machines Lab, Defeating Nondeterminism in LLM Inference, 10 September 2025. The 1000 completions, the split at token 103, and the throughput figures.
- vLLM, Batch invariance, and SGLang, Deterministic inference. The self-hosted settings, both checked 22 October 2026.
- Anthropic, Claude Opus 5.5 migration guide, and Google, Gemini API reference. The sampling settings as of October 2026.
- Atil et al., Non-Determinism of "Deterministic" LLM Settings, revised April 2025. Accuracy moving by up to 15% across runs on five models.
- How LLM inference works. The batch a request shares, and why servers build it.
- How to build an LLM evaluation from real failures. The case set that repeat runs sit on top of.
- GPT-4o deprecation: dates, replacement and how to migrate. The order of checks when the model id itself changes.
- Testing MCP servers before agents depend on them. A contract test with no model beside an agent eval, the same split between what must hold and what a model chooses.
- Dual-layer production agent ops. Where the versioned trace is watched after launch.
- Skionis build notes and Prospex build notes. The structured spec, the validation loop and the cache-first runtime.