TL;DR
Even when configured to be perfectly deterministic (e.g., setting temperature to zero), Large Language Models (LLMs) running on GPUs can produce different outputs across identical runs due to low-level floating-point rounding errors. This paper shifts the analytical focus from final text changes to underlying token-level probabilities, revealing that this hardware-induced noise uniformly impacts mid-range token probabilities (0.1 to 0.9) while leaving extreme probabilities virtually untouched. Remarkably, this nondeterministic behavior remains highly consistent across different model architectures, sizes, and even competing GPU vendors.
What Problem Does This Paper Address?
In the world of LLM evaluation and deployment, reproducibility is a major headache. Engineers often assume that fixing random seeds and setting the softmax temperature to zero guarantees identical outputs. However, recent studies have shown that LLMs can still exhibit nondeterminism.
This happens because floating-point arithmetic is non-associative (i.e., $(A + B) + C$ does not always equal $A + (B + C)$ in computer memory). When an LLM runs on a GPU, concurrent processes, thread scheduling, and batching alter the exact order in which thousands of parallel operations are executed. This introduces tiny rounding errors that can cascade through the network.
While previous research focused on how this noise alters final text outputs, this paper looks under the hood at the raw token probability distributions (logits) across repeated runs to understand exactly where, how, and why this noise manifests.
Methods
The authors designed a systematic framework to isolate and measure token-level variance. They ran identical prompts 50 times ($N=50$) across various configurations and tracked the top-10 token probabilities at each inference step.
To quantify the nondeterminism, they introduced two primary metrics:
- Standard Deviation ($\sigma_j$) of a token's probability across the 50 runs.
- Range ($R_j$), calculated as the maximum probability minus the minimum probability observed across the runs.
They evaluated these metrics across four state-of-the-art open-weight models (Gemma3-12B, Llama3.2-11B, Qwen3-VL-8B, and DeepSeek-Qwen3-8B) using four different hardware platforms: NVIDIA A100, H200, RTX A6000, and Huawei's Ascend-910 accelerator. They also varied batch sizes (2, 4, 8, and 16) to observe the impact of concurrent GPU workloads.
Datasets
The evaluation utilized the Massive Multitask Language Understanding (MMLU) dataset, which spans 57 subjects ranging from mathematics to humanities. For each test batch, the authors randomly selected one "evaluation prompt" and $B-1$ "concurrent prompts" to simulate realistic, multi-tenant workload conditions on the GPU.
Key Insights and Ideas
- The Softmax Shield and Amplifier: Interestingly, the raw logit variations (the values before normalization) are uniform across all tokens. However, the softmax function acts as a non-linear amplifier in the mid-range (0.1 to 0.9) and a suppressor near the boundaries (close to 0 or 1). If a token is highly certain ($p \approx 1$) or highly unlikely ($p \approx 0$), the hardware noise is squashed to near-zero. If there is a close race between multiple tokens, the noise is amplified.
- Universal Behavior Across Hardware and Models: Nondeterminism is surprisingly democratic. The trends and absolute values of probability variations were nearly identical across all tested models, model sizes (scaling Gemma from 270M to 12B parameters), and GPU architectures—including Huawei's Ascend platform, which was evaluated for nondeterminism here for the first time.
- Batch Size Escalation: Larger batch sizes consistently increase the magnitude of nondeterministic variance. More concurrent sequences mean more memory contention and more variable parallel execution paths on the GPU, compounding the rounding errors.
- Predicting Impact via Single Inferences: Because the noise profile is so mathematically consistent across models, researchers don't need to run expensive 50-inference checks to see if a model is unstable. Instead, they can analyze a single inference run: models or prompts that generate a high frequency of mid-range token probabilities (0.1–0.9) are inherently more vulnerable to nondeterministic text shifts.
Key Results
- For roughly 90% of all generated tokens, the variation range was exceptionally low (<0.01%). Only about 1% of tokens experienced a probability range variation reaching 5%.
- As shown in the paper's breakdown of variance versus baseline probability, the average range ($R_j$) and standard deviation ($\sigma_j$) remain flat and significant across the entire 0.1 to 0.9 spectrum, dropping off precipitously only when approaching 0 or 1.
Limitations and Future Work
While comprehensive, the authors note several avenues for expanding this research:
- Multi-GPU Environments: All tests were conducted on single GPUs. Distributed setups (using tensor or pipeline parallelism) introduce inter-GPU communication and synchronization overhead, which could alter or worsen the noise profile.
- Precision Formats: The study exclusively utilized the BF16 precision format. Future work should explore how FP16 or newer FP8 formats scale this nondeterminism.
- Hyperparameters: The token probabilities were computed assuming a standard softmax temperature of 1. Exploring different temperatures ($T \neq 1$) would clarify how scaling affects boundary suppression.
- Language Diversity: The evaluation prompts were entirely in English; testing other human or programming languages would verify if these structural probability patterns hold globally.
Summary updated