Accelerating the Mitigation of LLM Inference Nondeterminism Across GPU Architectures

📄 arXiv: 2609.25624v1 📥 PDF

作者: Liam Cooper, Shinnung Jeong, Hyeran Jeon, Jeffrey Young, Hyesoon Kim

分类: cs.AR, cs.LG

发布日期: 2026-09-22

备注: 14 pages, 5 figures


💡 一句话要点

提出固定配置的GEMM内核以解决GPU架构间LLM推理非确定性问题

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 大型语言模型 推理可重复性 GPU架构 浮点数运算 性能优化 深度学习

📋 核心要点

  1. 现有LLM推理方法在不同GPU架构上输出不一致,主要由于浮点数运算的非结合性和内核选择的硬件依赖性。
  2. 本文提出了一种使用固定配置的GEMM内核的解决方案,通过确保浮点数归约顺序仅依赖于问题形状来实现可重复性。
  3. 实验结果显示,所提方案在不同GPU上输出逐位一致,且性能提升显著,运行速度比现有方案快1.17到3.1倍。

📝 摘要(中文)

大型语言模型(LLM)的输出在贪婪解码下应当是可重复的,但实际上相同的模型、提示和软件栈在不同GPU上会产生不同的输出。根本原因在于浮点数非结合性与硬件依赖的内核选择。现有解决方案在跨架构可重复性方面存在不足,并且性能损失显著。本文提出了一种解决方案,采用固定配置的融合上溢GEMM内核,从内存加载16位权重,转换为FP32并使用IEEE-754算术进行累加,确保浮点数的归约顺序仅依赖于问题形状,从而实现跨架构的可重复性。实验表明,该方案在NVIDIA Ampere、Ada和Hopper GPU上输出逐位一致,同时比现有方案快1.17到3.1倍,并将权重内存流量减半。

🔬 方法详解

问题定义:本文旨在解决大型语言模型推理在不同GPU架构间输出不一致的问题。现有方法由于浮点数运算的非结合性和硬件依赖的内核选择,导致输出结果不稳定,且跨架构的可重复性不足。

核心思路:论文提出的核心思路是采用固定配置的融合上溢GEMM内核,确保浮点数的归约顺序仅依赖于问题形状,从而消除因硬件差异导致的输出不一致。通过这种设计,所有GPU执行相同的操作序列,实现跨架构的可重复性。

技术框架:整体架构包括加载16位权重、将其上溢为FP32、使用IEEE-754算术进行累加。该过程的归约顺序是问题形状的纯函数,与设备、SM数量或内核调度无关。

关键创新:最重要的技术创新在于通过固定浮点数归约顺序来实现跨架构的可重复性。这一方法与现有方案的本质区别在于不再依赖于舍入差异,而是确保每个GPU执行相同的操作序列。

关键设计:关键设计包括固定配置的GEMM内核,采用IEEE-754算术进行累加,确保在不同GPU上输出逐位一致。此外,通过减少权重内存流量,提升了整体性能。

🖼️ 关键图片

img_0
img_1
img_2

📊 实验亮点

实验结果表明,所提方案在NVIDIA Ampere、Ada和Hopper GPU上输出逐位一致,且在端到端性能上比现有最先进方案快1.17到3.1倍。同时,权重内存流量减少了一半,显著提升了效率。

🎯 应用场景

该研究的潜在应用领域包括自然语言处理、机器翻译和对话系统等,尤其是在需要高可重复性和高性能的场景中。通过提高不同GPU架构间的可重复性,该方法能够促进模型的开发和部署,降低因硬件差异带来的不确定性,提升用户体验。未来,该技术可能会影响更广泛的深度学习应用,推动跨平台模型的标准化。

📄 摘要(原文)

Large language model (LLM) outputs are expected to be reproducible under greedy decoding, yet in practice the same model, prompt, and software stack produce different outputs on different GPUs. The root cause is floating-point non-associativity combined with hardware-dependent kernel selection. Inference frameworks select different matrix-multiplication kernels on each architecture, with different parallel reduction orders and unspecified tensor-core arithmetic, and the resulting rounding differences can flip output tokens. Existing solutions have imperfect cross-architecture reproducibility and incur a significant performance penalty. We present a solution employing a set of fixed-configuration fused-upcast GEMM kernels that load 16-bit weights from memory, upcast them to FP32 in registers, and accumulate with IEEE-754 arithmetic in a reduction order that is a pure function of the problem shape and is therefore independent of the device, its SM count, or kernel scheduling. By fixing the floating-point reduction order as a function of problem shape alone, every GPU runs the same operation sequence, so cross-architecture reproducibility of the linear layers reduces to correct IEEE-754 arithmetic rather than to rounding differences staying below a tie-flip threshold. We confirm our solution's linear-layer outputs are bitwise identical across NVIDIA Ampere, Ada, and Hopper GPUs, while running $1.17$ to $3.1\times$ faster end-to-end than the state-of-the-art solution and cutting weight-memory traffic in half.