atlas

Research map / Large language models / Reasoning and chain of thought

Understanding and Mitigating Numerical Sources of Nondeterminism in LLM Inference

NeurIPS 2025 · Large language models › Reasoning and chain of thought · approach: Efficient LLM serving · 4 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

The paper shows that BF16 inference makes greedy decoding and sampling-based benchmark results of reasoning LLMs vary across GPU count, GPU type, and batch size, and proposes LayerCast (BF16 storage, FP32 compute) as a cheaper route to near-FP32 reproducibility.

Problem

LLM benchmark results under greedy decoding and random sampling are not reproducible across hardware and system configurations (GPU count, GPU type, evaluation batch size) because of floating-point rounding under limited precision, especially for long reasoning chains.

Approach

Systematically quantify how BF16, FP16 and FP32 precision drive divergence in greedy outputs and variance in sampled Pass@1 across 12 runtime configurations, and propose LayerCast, which stores weights in 16-bit but upcasts each linear layer's weights to FP32 just-in-time so all computation is FP32.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use FP32 instead of BF16DeepSeek-R1-Distill-Qwen-7B greedy inference · AIME'24 across 12 runtime configurationsStd@Acc: 9.15% -> 0Helped
Use FP32 instead of BF16DeepSeek-R1-Distill-Qwen-7B greedy inference · MATH500 across 12 runtime configurationsAvg_Std@Output_Length: 2774.28 -> 138.75Helped
Use FP16 instead of BF16DeepSeek-R1-Distill-Qwen-7B greedy inference · AIME'24 across 12 runtime configurationsStd@Acc: 9.15% -> 5.74%Helped
Use FP32 instead of BF16DeepSeek-R1-Distill-Qwen-7B random-sampling inference · MATH500 (n=4)Std of Pass@1: 0.3158 -> 0.1021Helped
Use FP32 instead of BF16DeepSeek-R1-Distill-Qwen-7B random-sampling inference · AIME'24 (n=64)Std of Pass@1: 0.3749 -> 0.7377Hurt
Store weights in BF16 and perform computations in FP32 (LayerCast)DeepSeek-R1-Distill-Qwen-7B inference · Greedy decoding across runtime configurationsOutput divergence: below 3.4%Helped
Store weights in BF16 and perform computations in FP32 (LayerCast)LLM inference · Inference memory useMemory usage reduction vs full FP32: 34%Helped
Use FP32 instead of BF16Qwen3-32B greedy inference · AIME'24 across runtime configurationsStd@Acc: 5.02% -> 1.11%Helped
Use FP32 instead of BF16DeepSeek-R1-Distill-Llama-8B greedy inference · GPQA Diamond across runtime configurationsStd@Acc: 3.03% -> 1.96%Helped
Increase GPU count from 2 to 4 (ablation)LLM greedy inference on L40S · Across tested benchmarks and modelsAvg_Std@top1_probMixed
Reduce batch size (ablation)LLM greedy inference · Across tested runtime configurationsAvg_Std@top1_probHurt
Use A100 instead of L40S (ablation)LLM greedy inference · Matched runtime configurationsAvg_Std@top1_probHurt

Surprising findings

Limitations

Experimental setup

Datasets: AIME'24 MATH500 LiveCodeBench-Easy LiveCodeBench-Medium LiveCodeBench-Hard GPQA Diamond

Benchmarks: AIME'24 MATH500 LiveCodeBench-Easy LiveCodeBench-Medium LiveCodeBench-Hard GPQA Diamond

Metrics: Std@Acc Avg_Std@Output_Length Div_Index Div_Percent Avg_Std@top1_prob Pass@1

Baselines: BF16 inference FP16 inference FP32 inference

Builds on: vLLM SkyThought Batch-invariant operations

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy