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 Berman연사 · Forward Future
채널
Matthew Berman
게시일
2025년 9월 16일
영상
8:47
읽기
3분
슬라이드
4
원문
영어
YouTube에서 열기
스크롤하면 영상이 오른쪽 아래로 작아져 계속 재생됩니다. 자막은 읽기 언어를 따릅니다.
읽기 언어2개 언어로 읽을 수 있음
이 글은 아직 한국어 번역이 없어 영어 원문으로 표시합니다.
요약

30초 요약

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.

핵심 정리

  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.
전문

챕터별로 다듬은 전문 읽기

원본 자막만 보기
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
슬라이드 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
슬라이드 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
슬라이드 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
슬라이드 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.

같은 채널의 다른 글

슬라이드 12장34:21EN
Matthew Berman· 2026년 10월 27일Matthew 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 Safety엔터프라이즈 AI+2
0:26EN
Matthew Berman· 2026년 10월 25일Sam Altman on Human Values and Problem-Solving in an AI WorldSam Altman · OpenAIIn a short interview excerpt, Altman considers the enjoyment of solving hard problems and the human role in interpreting results.Human-AI CollaborationFuture of WorkAI Strategy
슬라이드 2장0:36EN
Matthew Berman· 2026년 10월 25일Kimi K3.1 and a Rubik’s Cube Solver DemonstrationMatthew Berman · Forward FutureMatthew Berman shows a scrambled virtual cube being solved and gives the Kimi K3.1 test a favorable assessment.평가(Evals)코딩 에이전트Open-weight models
슬라이드 2장0:21EN
Matthew Berman· 2026년 10월 24일An AI-Generated Kimi Benchmark Chart Used Invented ScoresMatthew Berman · Forward FutureMatthew Berman asks for a graph of Kimi K3.1 Pro benchmarks, then discovers that the displayed figures are illustrative placeholders.Benchmarks평가(Evals)Generative media
슬라이드 6장25:50EN
Matthew Berman· 2026년 10월 24일Kimi 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장32:20EN
Matthew Berman· 2026년 10월 23일Who 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