按年被提到
20252025 · 4 次2026
大模型与语言模型›提示工程与输出稳定性·arXiv:2506.09501 · cs.CL

Understanding and Mitigating Numerical Sources of Nondeterminism in LLM Inference

理解并缓解大模型推理中的数值非确定性来源
Jiayi Yuan, Hao Li, Xinheng Ding, Wenya Xie, Yu-Jhe Li, Wentian Zhao, Kun Wan, Jing Shi, Xia Hu, Zirui Liu · 2025

GPU数目、批大小等配置会因浮点舍入让LLM输出不一致

开始阅读 ↗PDFalphaXiv 讨论
被提及 · 5 人首次 2025-06-22 · 最近 2026-09-03
5不同的人
5活跃月份
7讨论串
21被引(OpenAlex)

论文指出大模型成绩的可复现性很脆弱:评测批大小、GPU 数量和 GPU 版本等系统配置变化,就会让生成结果出现显著差异,推理模型尤其明显,因为早期 token 的微小舍入差异会级联成不同的思维链。例如在 bfloat16 与贪心解码下,DeepSeek-R1-Distill-Qwen-7B 的准确率最多波动 9%,响应长度相差约 9000 个 token。作者把根源追溯到有限精度下浮点运算不满足结合律,并提出轻量推理流程 LayerCast:以 16 位存权重、全部计算用 FP32,在显存效率与数值稳定间折中。

HN 为什么提它

HN 评论者引它反驳“把温度设为 0 就能得到确定性输出”的误解,说明浮点运算和 GPU 非确定性会让 LLM 推理结果不可复现。

实证研究难度 3 / 5约 45 分钟经得起时间
读之前最好知道
1浮点数与舍入误差
2bfloat16、FP32 等数值精度
3LLM 推理中的贪心解码与批处理
4GPU 并行归约(reduction)

HN 书评

推荐在前,同类按时间 · 每篇最多保留 20 条,统计用全部提及
引用Der_Einzige · 2025-06

“Also greedy sampling considered harmful: Understanding and Mitigating Numerical Sources of Nondeterminism in LLM Inference”

补充指出 greedy sampling 有害
TPU Deep Dive原评论 ↗
引用mzl · 2025-07

“See Understanding and Mitigating Numerical Sources of Nondeterminism in LLM Inference for some details on that.”

指引去看部署变化如何通过舍入误差改变 LLM 输出
LLMs as Compilers原评论 ↗
引用spindump8930 · 2025-07

“I wanted to point out this paper: Understanding and Mitigating Numerical Sources of Nondeterminism in LLM Inference which analyzes the issues around GPU non determinism”

指出它分析了 GPU 非确定性问题
Grok: Searching X for "From:Elonmusk (Israel or Palestine or Hamas or Gaza)"原评论 ↗
引用rvz · 2026-02

“only repeating a known misconception of tweaking the temperature to 0 which does not bring the determinism you claim it brings with LLMs [0] [1] [2]”

拿它反驳把 temperature 设为 0 就能确定性的误解
LLMs could be, but shouldn't be compilers原评论 ↗
引用shakna · 2026-08

“Floating point matrix calculations are non-deterministic.”

拿它说明浮点矩阵计算本身是非确定性的
What my dad taught me about AI coding in the 90s原评论 ↗
被提交为 story · 2 次