提出Metis框架,实现大模型低比特训练的高精度突破
Metis: Training LLMs with FP4 Quantization
- 在频谱域分割异质数据分布,分块独立量化减少误差
- 训练损失仅比全精度高0.4%,下游准确率下降0.1%
- 比未公开的Nvidia FP4方案更优,且计算开销更低
本工作发现参数、激活值和梯度的奇异值谱存在各向异性,是限制大语言模型低比特训练的根本障碍。这些谱主要由少数大奇异值主导,导致数值范围过宽,引发量化偏差和严重谱失真,最终损害训练性能。本文提出Metis,一种频谱域量化框架,将异质谱划分为更窄的子分布进行独立量化,从而降低误差并保留谱结构。为最小化开销,Metis利用主导谱空间的两个关键特性:稀疏随机采样可保持信息,随机投影亦能保形,使分解成本几乎可忽略。在使用1000亿词训练的LLaMA-3 8B模型上,Metis实现了权重、激活值、梯度均为W4A4G4的稳健训练,相比BF16仅产生0.4%的训练损失差距,下游准确率下降0.1%。除媲美BF16精度外,还超越我们实现的Nvidia最新(尚未公开)FP4方案,持续取得更低损失与更高下游准确率,同时显著降低计算开销。代码已公开于https://anonymous.4open.science/r/Metis-quantization-644B。
原文摘要 · Abstract (English)
This work identifies anisotropy in the singular value spectra of parameters, activations, and gradients as the fundamental barrier to low-bit training of large language models (LLMs). These spectra are dominated by a small fraction of large singular values, inducing wide numerical ranges that cause quantization bias and severe spectral distortion, ultimately degrading training performance. This work presents Metis, a spectral-domain quantization framework that partitions anisotropic spectra into narrower sub-distributions for independent quantization, thereby reducing errors and preserving spectral structure. To minimize overhead, Metis leverages two key properties of the dominant spectral subspace: preservation via sparsely random sampling and preservation via random projection, reducing decomposition cost to a negligible level. On LLaMA-3 8B trained with 100B tokens, Metis enables robust W4A4G4 training with FP4 quantization of weights, activations, and gradients, yielding only a 0.4% training loss gap and a 0.1% degradation in downstream accuracy relative to BF16. Beyond matching BF16 fidelity, Metis also surpasses our implementation of Nvidia's recently announced (yet to be publicly released) FP4 recipe, consistently achieving lower loss and higher downstream accuracy while incurring significantly lower computational overhead. The code implementation for Metis is available at: https://anonymous.4open.science/r/Metis-quantization-644B.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。