arXiv論文メモ
新着一覧
cs.AR / cs.LG · 査読状況未確認

異なるGPU間で言語モデルの推論結果を再現する計算手法

Accelerating the Mitigation of LLM Inference Nondeterminism Across GPU Architectures

Liam Cooper, Shinnung Jeong, Hyeran Jeon, Jeffrey Young, Hyesoon Kim

この論文をやさしく読む

ひとことで言うと

同じ言語モデルの推論がGPUの種類によって変わる問題に対し、行列演算の加算順序を固定する方法を示した。

何に役立つ?

異なるGPUでLLMの推論結果を再現したい場合の、線形層の実装方法として参考になる。

この研究の面白いところ

演算順序を問題の形状だけで決めることで、Ampere、Ada、Hopper間の線形層出力をビット単位で一致させ、比較手法より端から端まで1.17~3.1倍速かった。

どこまで分かった?

ビット単位の一致を確認した対象として要旨に明示されるのは線形層と、NVIDIAの三系統のGPUである。モデル全体の全条件での完全一致を示したとは書かれていない。

v1のアブストラクトに基づくAI解説。日本語訳とは別に、用途の解釈を含みます。

アブストラクトの日本語訳

大規模言語モデル(LLM)の出力は、貪欲復号なら再現可能と期待されるが、実際には同じモデル、入力、ソフトウェア構成でも、GPUが異なると出力が変わる。根本原因は、浮動小数点演算で足し算の順番によって結果が変わることと、ハードウェアごとに異なる計算カーネルが選ばれることの組み合わせである。推論基盤はアーキテクチャごとに別の行列乗算カーネルを選ぶため、並列加算の順序や、仕様が明示されないテンソルコアの算術が異なる。その丸め誤差によって、選ばれる出力トークンが逆転することがある。既存の対策は、異なるアーキテクチャ間での再現性が完全ではなく、速度の低下も大きい。 本論文は、設定を固定した一連の融合型・高精度化GEMMカーネルを用いる解決策を示す。メモリーから16ビットの重みを読み込み、レジスター内でFP32に変換し、IEEE 754に従う算術で累積する。加算の順序は問題の形状だけで決まり、機器、SMの数、カーネルの実行順序には依存しない。こうして全GPUで同じ演算列を実行するため、線形層の異種アーキテクチャ間での再現性は、丸めの差がトークン選択を逆転させる閾値を下回るかではなく、IEEE 754演算が正しく行われるかに帰着する。NVIDIAのAmpere、Ada、HopperのGPU間で、線形層の出力がビット単位で一致することを確認した。最先端の比較手法より端から端までの実行速度は1.17~3.1倍で、重みのメモリー転送量は半分だった。

v1の要旨から自動生成。本文の精読・人による確認は未実施。

初稿
2026-09-22(UTC)
最新改訂
2026-09-22 · v1
査読・掲載
査読状況未確認
arXivで読むPDF

更新履歴

取得できた版を表示。版の更新は査読済みを意味しません。過去版の本文差分は未解析です。

原文の要旨

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.

著者のコメント

14 pages, 5 figures

arXiv ID: 2609.25624 / 要約の誤りについて