The Butterfly Effect of Silicon: Why Deterministic LLMs Still Spin Chaos at Temperature Zero

Main Facts: The Illusion of Certainty in Large Language Models

When Horace He and a team of researchers at the Thinking Machines Lab initiated a straightforward computational experiment in September 2025, they were testing a foundational assumption of modern artificial intelligence. They sent the prompt "Tell me about Richard Feynman" to the massive Qwen3-235B model 1,000 times. Every single query was executed at a temperature of 0—a setting that forces the neural network to consistently select the mathematically most probable next token, eliminating randomized sampling.

Under standard computing logic, running the exact same deterministic function a thousand times should yield one thousand identical strings of text. Instead, the model generated 80 unique completions.

This phenomenon exposes a profound architectural vulnerability in large language models (LLMs): the illusion of deterministic output. While the mathematical logic governing neural networks is fundamentally deterministic, the physical reality of floating-point arithmetic on massively parallel hardware introduces microscopic variations. These minuscule discrepancies compound over billions of parameters, occasionally causing the model to cascade down entirely different semantic paths.

The investigation into these digital divergences has unlocked a new mathematical framework for predicting when and why models "flake," shifting how engineers evaluate reproducibility, system reliability, and deterministic inference in production environments.


Chronology of Discovery: From Feynman Prompts to the Mathematics of Near-Ties

The September 2025 Experiment

The anomaly first captured the industry’s attention due to the precise moment the outputs diverged. Researchers tracking the Qwen3-235B completions observed that all 1,000 responses were completely identical for the first 102 tokens. The model faithfully reproduced the opening biographical details of the legendary physicist without a single character drifting.

However, at token 103, the timeline split. Exactly 992 runs continued with the phrase "Queens, New York," while the remaining 8 runs pivoted to "New York City." Eight executions out of a thousand abruptly flipped at a single point, preceded by 102 tokens where no divergence occurred whatsoever.

Tracing the Root Cause: Floating-Point Non-Associativity

To understand how identical prompts yield divergent trajectories, researchers had to look beneath the software layer down to how hardware processes data. At temperature 0, a model selects the token associated with the highest logit—its raw, unnormalized score. Calculating these logits requires billions of floating-point additions.

Why Temperature 0 Isn't Deterministic

In computer science, floating-point addition is not associative; the grouping and sequence of operations change the final outcome due to rounding errors. Summing 100,000 random numbers in forward order, reverse order, or via pairwise summation yields three different numerical values.

While popular industry lore blamed random GPU thread completion schedules, the Thinking Machines Lab demonstrated that typical LLM forward passes contain virtually no atomic add race conditions, and identical kernels on identical inputs return identical bits.

Instead, the true culprit is batch-invariant reduction order. On modern shared cloud servers, the batch size of incoming requests fluctuates dynamically based on concurrent user traffic. Because reduction orders shift alongside batch sizes, a user’s model output is subtly influenced by the actions of completely unrelated strangers querying the server at that exact millisecond.


Supporting Data and Mathematical Modeling: Deriving the Flip Rate

To move beyond qualitative observations, mathematicians sought a predictive model to answer a critical question: How often should a token flip, and why do these risks manifest in sudden spikes rather than a steady trickle?

The Near-Tie Principle

The mathematics of token flipping hinge entirely on near-ties. Let $z_1$ and $z_2$ represent the two largest logits in a given layer, with their difference defined as the gap:

$$M = z_1 – z_2 ge 0$$

Numerical noise from hardware operations introduces a small error term, $Delta$. The model’s argmax selection only flips if the perturbed gap crosses zero:

Why Temperature 0 Isn't Deterministic

$$M + Delta < 0$$

Tokens with a wide logit gap (e.g., $M = 8$) will never flip, regardless of system noise. Only near-ties sit in the danger zone. By averaging across all positions against the density of gaps ($f$), the overall flip probability ($p$) can be expressed as:

$$p approx f(0) cdot fracE2$$

This compact formula reveals a two-part reality:

  1. The Model Factor ($f(0)$): How frequently the model encounters close semantic choices in its text generation.
  2. The Hardware Factor ($E|Delta|$): The magnitude of noise introduced by your specific computing stack, precision settings, and kernel optimizations.

Testing the Formula via Simulation

Simulations using exponential and half-normal gap distributions validated the formula with high precision. For $sigma$ (noise size) values up to 0.03, the theoretical model matched simulations within a 4% margin of error. Even when noise scaled up to $sigma = 0.3$, the half-normal distribution remained within 2% of the predicted values.

However, the formula encounters limits when system noise matches the scale of the typical logit gap ($sigma = 1$). In such high-noise environments, the density function is no longer flat across the critical region, causing theoretical predictions to diverge from empirical outcomes.

Furthermore, if a model’s gap density vanishes at zero ($f(0) = 0$), the flip rate scales quadratically ($sigma^2$), rendering the system significantly more resilient to minor hardware perturbations.

Why Temperature 0 Isn't Deterministic

Official Responses and Industry Implications

The discovery of non-determinism at temperature zero has forced infrastructure providers and AI platform engineers to re-evaluate how inference engines are built and deployed.

The Cost of Determinism

To mitigate these fluctuations, engineers can deploy batch-invariant kernels that force consistent reduction orders regardless of server load. When the Thinking Machines team implemented batch-invariant kernels during testing with the Qwen-3-8B model on a single GPU, all 1,000 Feynman completions executed identically.

However, this algorithmic stability exacts a heavy performance tax. The unoptimized deterministic version required 55 seconds to complete a benchmark task, compared to just 26 seconds for default vLLM configurations, and 42 seconds after applying an improved attention kernel. In high-throughput enterprise environments, paying a near-doubling in inference latency simply to guarantee absolute bit-for-bit reproducibility is a difficult trade-off to justify.

Academic and Industry Recognition

This work aligns closely with emerging formalizations in machine learning literature, such as the concept of "background temperature" introduced by Messina and Scotta (TMLR, 2026), which treats hardware-induced arithmetic perturbations as an effective thermodynamic temperature acting upon the neural network.


Implications for Developers and AI Deployments

The implications of silicon-level non-determinism extend deep into software engineering workflows, automated testing, and safety evaluations.

1. Predicting the "Flake Rate"

Software teams can mathematically estimate their system’s flake rate. If a serving stack exhibits a per-token flip rate ($p$), a completion spanning $L$ tokens will diverge between runs with a probability of:

$$1 – exp(-p cdot L)$$

Why Temperature 0 Isn't Deterministic

For a model with a conservative per-token flip rate of $10^-3$ generating 500-token answers, nearly 39% of all generation runs will feature some level of internal divergence. Quantifying $f(0)$ and stack noise allows engineering teams to calculate these risks before pushing models to production.

2. Moving Away from Exact Equality Assertions

Automated testing suites and regression pipelines can no longer rely on strict string matching for temperature-0 outputs. Engineers must adopt semantic grading, fuzzy comparisons, or tolerance-based assertions when validating LLM outputs.

3. The Fragility Spread

As demonstrated by survival analysis curves, risk is never distributed evenly across a text generation. Long stretches of predictable, high-confidence tokens are punctuated by isolated, high-stakes "knife-edge" tokens where alternative semantic branches compete fiercely. A prompt’s overall resilience is dictated not just by its average flip rate, but by the clustering and variance of these fragile decision points.

Conclusion

The illusion that digital computers execute artificial intelligence with absolute, clockwork precision is fading. As models grow larger and deployment architectures scale across sprawling, shared cloud hardware, the physical realities of floating-point arithmetic will continue to bubble to the surface. Understanding the mathematical mechanics behind these micro-fluctuations is no longer an academic exercise—it is an essential requirement for engineering reliable, trustworthy AI systems in an inherently noisy digital world.

Back To Top