Quartet: 大規模言語モデルにおけるネイティブFP4トレーニングの最適性
Quartet: Native FP4 Training Can Be Optimal for Large Language Models
May 20, 2025
著者: Roberto L. Castro, Andrei Panferov, Soroush Tabesh, Oliver Sieberling, Jiale Chen, Mahdi Nikdan, Saleh Ashkboos, Dan Alistarh
cs.AI
要旨
大規模言語モデル(LLMs)の急速な進展に伴い、計算需要も前例のない速度で増加しており、最先端モデルのトレーニングコストは数ヶ月ごとに倍増しています。低精度演算で直接モデルをトレーニングすることは、計算スループットとエネルギー効率の両方を向上させる解決策を提供します。特に、NVIDIAの最近のBlackwellアーキテクチャは、極めて低精度の操作、具体的にはFP4バリアントを可能にし、大幅な効率向上を約束しています。しかし、現在のFP4精度でのLLMトレーニングアルゴリズムは、精度の大幅な低下に直面し、しばしば混合精度のフォールバックに依存しています。本論文では、ハードウェアサポートによるFP4トレーニングを体系的に調査し、主要な計算(例えば線形層)が低精度で行われる正確なエンドツーエンドのFP4トレーニングを可能にする新しいアプローチ、Quartetを紹介します。Llamaタイプのモデルに対する広範な評価を通じて、異なるビット幅にわたるパフォーマンスのトレードオフを定量化し、精度対計算の観点で「ほぼ最適」な低精度トレーニング技術を特定する新しい低精度スケーリング則を明らかにします。私たちは、NVIDIA Blackwell GPU向けに最適化されたCUDAカーネルを使用してQuartetを実装し、FP4精度で最先端の精度を達成し、数十億規模のモデルのトレーニングに成功することを示します。私たちの手法は、完全なFP4ベースのトレーニングが標準精度やFP8トレーニングに匹敵する競争力のある代替手段であることを実証しています。私たちのコードはhttps://github.com/IST-DASLab/Quartetで公開されています。
English
The rapid advancement of large language models (LLMs) has been paralleled by
unprecedented increases in computational demands, with training costs for
state-of-the-art models doubling every few months. Training models directly in
low-precision arithmetic offers a solution, by improving both computational
throughput and energy efficiency. Specifically, NVIDIA's recent Blackwell
architecture facilitates extremely low-precision operations, specifically FP4
variants, promising substantial efficiency gains. Yet, current algorithms for
training LLMs in FP4 precision face significant accuracy degradation and often
rely on mixed-precision fallbacks. In this paper, we systematically investigate
hardware-supported FP4 training and introduce Quartet, a new approach enabling
accurate, end-to-end FP4 training with all the major computations (in e.g.
linear layers) being performed in low precision. Through extensive evaluations
on Llama-type models, we reveal a new low-precision scaling law that quantifies
performance trade-offs across varying bit-widths and allows us to identify a
"near-optimal" low-precision training technique in terms of
accuracy-vs-computation, called Quartet. We implement Quartet using optimized
CUDA kernels tailored for NVIDIA Blackwell GPUs, and show that it can achieve
state-of-the-art accuracy for FP4 precision, successfully training
billion-scale models. Our method demonstrates that fully FP4-based training is
a competitive alternative to standard-precision and FP8 training. Our code is
available at https://github.com/IST-DASLab/Quartet.Summary
AI-Generated Summary