Why Identical LLM Prompts Can Produce Different Answers at Temperature Zero

Matthew Berman explains Thinking Machines Lab’s work on batch-invariant inference and what its reproducibility experiment actually showed.

MBMatthew BermanPonente · Forward Future
Canal
Matthew Berman
Publicado
16 sept 2025
Vídeo
8:47
Lectura
3 min
Diapositivas
4
Original
inglés
Abrir en YouTube
Al desplazarte, el vídeo se reduce a la esquina inferior derecha y sigue reproduciéndose. Los subtítulos siguen tu idioma de lectura.
Idioma de lecturaDisponible en 2 idiomas
Este artículo aún no está en español, así que se muestra el original en inglés.
RESUMEN

En 30 segundos

Matthew Berman reviews Thinking Machines Lab’s 2025 post on nondeterminism in language-model inference. He explains how changing batch sizes can change floating-point calculations and describes a reported experiment in which batch-invariant kernels produced identical completions under a particular setup.

  1. 1Sampling versus implementationSampling normally selects from a probability distribution; greedy selection at temperature zero removes this source of intentional randomness but does not guarantee identical calculations.
  2. 2Batch size affects numerical resultsDifferent batch sizes can change how floating-point reductions are performed, producing small numerical differences that may change a selected token.
  3. 3Batch-invariant kernelsThe post describes making operations such as normalization, matrix multiplication and attention invariant to batching, with possible performance costs.
  4. 4One experiment, 1,000 completionsThe reported baseline produced 80 unique completions; with the modified kernels the 1,000 completions were identical in that experiment.

Conclusiones

  1. Random sampling can intentionally vary outputs, while temperature-zero inference can still vary for numerical and implementation reasons.
  2. Floating-point rounding is not inherently random; changes in the order of operations can change numerical results.
  3. A request’s batch size may affect the computation even when each fixed-shape operation is repeatable.
  4. Batch-invariant kernels aim to preserve numerical results across batch sizes, potentially with performance tradeoffs.
  5. The reported 1,000 identical completions apply to one model, prompt and experimental setup, not all possible deployments.
  6. Reproducibility helps debugging and auditing, but identical answers are not necessarily accurate or safe.
TEXTO COMPLETO

Lee el texto editado por capítulos

Solo la transcripción
01

Why reproducibility matters

Berman introduces Thinking Machines Lab’s post and distinguishes repeated responses from deliberate sampling variability. Even temperature-zero generation can vary in practice.

Thinking Machines Lab, founded by former OpenAI CTO Mira Murati, has launched its research blog with a post about nondeterminism in language-model inference. I want to unpack the idea: give a model the same prompt repeatedly, and its responses may differ. That makes reproducing an experiment or debugging a result harder.

Identical responses can be useful for scientific testing and investigation, although variation can be desirable for creative writing. The post separates ordinary sampling from a less obvious problem. Sampling generally selects a token from a probability distribution; choosing the highest-probability token is the greedy, temperature-zero case, not the definition of all sampling.

Sampling and temperature zero
DIAPOSITIVA 1 / 4Sampling and temperature zeroThe post distinguishes probabilistic sampling from implementation-level variation that can persist at temperature zero.

Even with temperature set to zero, an inference service can produce different answers. A common explanation combines finite-precision floating-point arithmetic with parallel execution. Finite precision means calculations are rounded, and changing the grouping or order of additions can produce different results; rounding itself is not random.

02

Floating-point operations and batches

He discusses numerical precision, concurrency and the role of changing batch sizes. The post identifies a lack of batch invariance in the inference path.

GPUs perform many calculations in parallel, but concurrency alone does not mean every calculation produces a different answer. The post notes that repeatedly multiplying the same matrices in the same setup can give bitwise-identical results. It argues that this simple observation does not explain what changes when a serving system handles different batches.

Think of a batch as a carpool containing several user requests. The number of requests grouped together can vary with load. A different batch size can lead an implementation to organize its numerical work differently; because floating-point operations have finite precision, the resulting tiny differences can affect a token choice and later output.

Batch invariance
DIAPOSITIVA 2 / 4Batch invarianceThe displayed explanation describes how a request’s result can depend on batch size without information leaking between requests.
03

Batch-invariant kernels and experiment

Berman uses a kitchen analogy for consistent calculation and reviews the reported Qwen experiment. He closes with possible benefits for debugging and auditing.

The proposed approach is to make the relevant operations batch-invariant: a request should yield the same numerical result regardless of the batch size. I use a kitchen analogy: weigh and mix each bowl consistently even when the kitchen is busy. The underlying implementation addresses operations including normalization and matrix multiplication, not simply keeping processing speed constant.

Making operations batch-invariant
DIAPOSITIVA 3 / 4Making operations batch-invariantThe post identifies normalization, matrix multiplication and attention as operations to address.

Attention also involves combining information across prior tokens. If work is divided into different chunks, the order of numerical reductions can change. Consistent methods for those reductions can help preserve the result; the post goes into more technical detail and notes a potential performance tradeoff.

The Qwen reproducibility experiment
DIAPOSITIVA 4 / 4The Qwen reproducibility experimentThe screen reports 80 unique baseline outputs and 1,000 identical outputs using batch-invariant kernels for the tested setup.

The researchers tested Qwen3-235B-A22B-Instruct-2507 with the prompt asking about Richard Feynman, at temperature zero, generating 1,000 completions of 1,000 tokens each. Without their batch-invariant kernels, they report 80 unique completions, with the most common appearing 78 times. With the kernels enabled, all 1,000 completions were identical in that experiment.

That result is encouraging for reproducibility in the tested configuration, not proof that every model, hardware setup or source of variation has been solved. Repeatable results can make benchmarks, debugging and audits easier to interpret. They do not ensure that a response is correct, safe or trustworthy; those qualities still require separate evaluation.

Más de este canal

12 diapositivas34:21EN
Matthew Berman· 27 oct 2026Matthew Berman Examines Anthropic’s IPO Filing, AI Growth and GovernanceMatthew Berman, Sam Altman · Forward FutureThe presenter reviews the S-1’s financial metrics, compute strategy and voting structure while questioning the tension between rapid AI development and safety.AnthropicAI SafetyIA empresarial+2
6 diapositivas25:50EN
Matthew Berman· 24 oct 2026Kimi K3.1 Pro Tested: Strong 3D Demos, Uneven Results and Competitive PricingMatthew Berman · Forward FutureMatthew Berman tests the open-weight model on coding, 3D rendering and visual explanations, then compares benchmark results and prices.Open-weight modelsBenchmarksAI cost & performance+1
2 diapositivas32:20EN
Matthew Berman· 23 oct 2026Who Is Local AI For? The Costs, Trade-offs and a Hybrid FutureMatthew Berman · Forward FutureMatthew Berman weighs data control and independence against hardware cost, setup complexity and inference speed.Local inferenceOpen-weight modelsAI cost & performance+1
6 diapositivas1:03:37EN
Matthew Berman· 23 oct 2026Matthew Berman’s Team Tests Kimi K3.1 on Animation, Games, and ChartsMatthew Berman, Alex, Brian · Forward FutureA live team AMA turns into an informal test of Kimi K3.1, from personal-agent workflows to motion graphics, a browser game, and a benchmark chart.Agentes de programaciónGenerative mediaEvaluaciones+2
0:53EN
Matthew Berman· 22 oct 2026Sam Altman on AI and the Discovery of New KnowledgeSam Altman · OpenAIAltman expects progress in mathematical discovery to extend to biology, materials and energy.AI for scienceMathematicsComputational Biology+1
Diapositivas0:22EN
Matthew Berman· 21 oct 2026A Robot Bodyguard Video Shows Dramatic Rescue ScenariosMatthew Berman · Forward FutureMatthew Berman reacts to a short robot demonstration depicting fighting and vehicle-rescue scenarios.RoboticsEvaluaciones