arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2509.00404cs.LG
收藏

Metis:使用 FP4 量化训练 LLM

Metis: Training LLMs with FP4 Quantization

Fudan University(复旦大学);University of Bath(巴斯大学);Oxford Suzhou Centre for Advanced Research(牛津苏浙研究中心);Shanghai Innovation Institute(上海创新研究院);Huawei(华为公司)
Hengjie Cao, Mengyi Chen, Yifeng Yang, Ruijun Huang, Fang Dong, Jixian Zhou, Anrui Chen, Mingzhi Dong, Yujiang Wang, Jinlong Hou, Yuan Cheng, Fan Wu, Fan Yang, … 展开作者

Hengjie Cao, Mengyi Chen, Yifeng Yang, Ruijun Huang, Fang Dong, Jixian Zhou, Anrui Chen, Mingzhi Dong, Yujiang Wang, Jinlong Hou, Yuan Cheng, Fan Wu, Fan Yang, Tun Lu, Ning Gu, Li Shang

AI总结:

本文提出谱域 FP4 量化框架 Metis,通过分割各向异性谱并利用随机采样与投影降低分解开销,实现 LLaMA-3 8B 的 W4A4G4 高精度训练。

摘要:

本工作将参数、激活值和梯度的奇异值谱中的各向异性确定为大语言模型(LLM)低比特训练的根本障碍。这些谱由一小部分较大的奇异值主导,导致数值范围很宽,从而引发量化偏差和严重的谱失真,最终降低训练性能。本工作提出 Metis,这是一个谱域量化框架,将各向异性的谱划分为更窄的子分布以进行独立量化,从而减少误差并保留谱结构。为最大限度降低开销,Metis 利用主导谱子空间的两个关键性质:通过稀疏随机采样实现保留,以及通过随机投影实现保留,将分解成本降低到可忽略的水平。在使用 100B 个 token 训练的 LLaMA-3 8B 上,Metis 实现了稳健的 W4A4G4 训练,即对权重、激活值和梯度进行 FP4 量化;相对于 BF16,其训练损失差距仅为 0.4%,下游准确率下降仅为 0.1%。除了达到与 BF16 相匹配的保真度之外,Metis 还优于我们对 Nvidia 最近公布(但尚未公开发布)的 FP4 方案的实现,始终取得更低的损失和更高的下游准确率,同时带来显著更低的计算开销。Metis 的代码实现可在 https://anonymous.4open.science/r/Metis-quantization-644B 获取。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑