Accelerating the Mitigation of LLM Inference Nondeterminism Across GPU Architectures
Liam Cooper, Shinnung Jeong, Hyeran Jeon, Jeffrey Young, Hyesoon Kim
Abstract
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 to faster end-to-end than the state-of-the-art solution and cutting weight-memory traffic in half.
Create a lesson
Metadata
- Categories
- cs.AR, cs.LG
- Comments
- 14 pages, 5 figures
Related papers
PACER: Accelerating Mixture-of-Experts LLM Inference on High Bandwidth Flash Memory via Resource-Aware Expert Prefetching and Caching
Shared title terminologycs.ARGeraldo F. Oliveira, Ahmet Caner Yüzügüler, Renzo Andri et al.
Let2Gain: Efficient LLM Inference on 2.5D Chiplet Architecture using 2T Gain-Cell Memory
Shared title terminologycs.ARArkapravo Ghosh, XinXin Wang, Shuhan Liu et al.
VeriSegue: Local RL and Cloud LLM Collaborative Verification Across RISC-V Processors and AI Accelerators
Shared title terminologycs.ARYiran He, Haihua Shen, Pei Chen et al.
A Principled Architecture-Level Error Model for Understanding, Evaluating, and Mitigating DRAM Read Disturbance
Shared title terminologycs.ARHaocong Luo, Zhaoqiang Bai, Ataberk Olgun et al.
A Differential Computing Accelerator for LLM Inference Leveraging Bit-Slice Transition Sparsity
Shared title terminologycs.ARYifan Wang, Zetao Guo, You Xiao et al.
MixMoMo: Accelerating Extra--Large MoE Inference with Mixed--Precision GPU--NPU Execution on Mobile Devices
Shared title terminologycs.ARHailong Zou, Maoliang Li, Taohong Han et al.