arXiv論文メモ
新着一覧
cs.LG / cs.AI · 掲載先の記載あり

貪欲復号でも計算精度の違いで言語モデルの出力が変わる

Greedy Decoding Is Not Precision-Invariant: Cross-Precision Output Divergence in LLM Inference

Gaoyuan Du, Anam Nawaz Khan, Rex Zhou, Xiaoyang Liu, Deepayan Chakrabarti, Fnu Suya, Xueping Li

この論文をやさしく読む

ひとことで言うと

乱数を使わず一番確率の高い語を選んでも、BF16とFP16の計算の違いだけで文章が変わることを調べています。

何に役立つ?

モデルの出力を異なる数値精度の環境で再現したいとき、どこで差が生まれ、限定的に抑えられるかを判断する材料になります。

この研究の面白いところ

計算全体を高精度にすれば必ず一致するわけではなく、出力候補の差が小さいときだけヘッドを再計算する方法が有効でした。小さな1トークンの差が後続文全体へ広がる点を解析しています。

どこまで分かった?

改善は精度間の出力一致率であり、回答の正答率ではありません。効果は低バッチ条件などに限られ、バッチ8以上や全工程FP8では消失しています。学習時の精度安定性の役割は仮説として述べられています。

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

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

大規模言語モデルの貪欲復号は、一般に決定論的と見なされる。本研究は、それが数値精度の変更に対して不変ではないことを示す。同じハードウェア上で、同一のモデル、プロンプト、復号アルゴリズムでも、BF16とFP16では出力が異なる。6モデル、11億〜70億パラメータの4系列と3ベンチマークによる評価では、49〜100%のプロンプトで出力が分岐した。120億パラメータでも分岐を追加で特徴付けた。1トークンの選択の反転が、生成経路全体の分岐へ連鎖することが多い。経験的な誤差伝播解析を構築したところ、本体の22層に蓄積した誤差では、選択が反転するステップとしないステップを区別できなかった。主に結果を決めるのは、言語モデルの出力ヘッドにおける上位2候補のロジット差と、その2候補間の方向を持つ摂動との相対関係である。 この解析は、FP32計算をより広い範囲に適用すると一致が悪化することを含め、介入結果に関する5つの検証可能な予測を与える。実験は5つすべてと一致した。評価した低負荷の介入で最もよかったのは、差がしきい値未満の場合にだけ、出力ヘッドをFP32で選択的に再計算する方法だった。バッチサイズ4以下の単一ストリーム推論で、遅延増加を4%未満に抑えつつ、完全一致率をA10Gでは22〜36パーセントポイント、L4とA100では12〜21ポイント改善した。6モデルと4つのバッチサイズで適用範囲の境界を調べ、学習時の数値精度に対する安定性が決定要因になるという仮説を提示する。この方法は部分的な軽減策であり、普遍的な決定性の保証ではない。本体由来の誤差が支配すると利益は失われ、今回の試験ではバッチサイズ8以上と、全工程でFP8を使う場合がこれに含まれた。

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

初稿
2026-09-22(UTC)
最新改訂
2026-09-22 · v1
査読・掲載
掲載先の記載あり

著者による掲載先の記載:Transactions on Machine Learning Research, 2026。出版社での独立確認は未実施です。

arXivで読むPDF

更新履歴

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

原文の要旨

Greedy decoding from large language models is commonly treated as deterministic. We show it is not precision-invariant: the same model, prompt, and decoding algorithm produce different outputs in BF16 versus FP16 on identical hardware. Across our evaluations of six models (1.1B-7B parameters, four families; divergence additionally characterised at 12B) and three benchmarks, 49-100\% of prompts diverge; a single token flip often cascades into trajectory-level divergence. We develop an empirical error-propagation analysis and find that 22 layers of accumulated body error do not distinguish flipping from non-flipping steps; the outcome depends primarily on the top-two logit margin at the LM head relative to the directional perturbation between the top-two candidates. The analysis makes five testable predictions about intervention outcomes, including that applying more FP32 compute (broader scope) makes agreement worse. The experiments match all five predictions. The best-performing low-overhead intervention we evaluate, selective FP32 LM head recomputation, triggered only when the margin falls below a threshold, delivers +22-36 pp exact agreement on A10G (+12-21 pp on L4 and A100) at less than 4\% latency overhead in low-batch (batch size <=4) single-stream inference. We map the applicability boundary across six models and four batch sizes, and hypothesise that training-time precision stability is a determining factor. The method is a partial mitigation rather than a universal determinism guarantee: its benefit vanishes when body-originated error dominates, including at batch size >=8 and under end-to-end FP8 in our tests.

著者のコメント

Accepted by Transactions on Machine Learning Research (TMLR), 2026

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