arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2603.10444cs.LGcs.AI
收藏

FP4量化LLM训练中均值偏差的诅咒与祝福

The Curse and Blessing of Mean Bias in FP4-Quantized LLM Training

Fudan University(复旦大学);University of Bath(巴斯大学);Shanghai Innovation Institute(上海创新研究院);University of Oxford(牛津大学);Oxford Suzhou Centre for Advanced Research(牛津苏浙研究中心);University of Colorado Boulder(科罗拉多大学波德格分校);University of Michigan(密歇根大学);Shenzhen Loop Area Institute(深圳河套学院)
Hengjie Cao, Zhendong Huang, Mengyi Chen, Yifeng Yang, Fang Dong, Anrui Chen, Ruijun Huang, Xin Zhang, Mingzhi Dong, Yujiang Wang, Jinlong Hou, Qin Lv, Robert P… 展开作者

Hengjie Cao, Zhendong Huang, Mengyi Chen, Yifeng Yang, Fang Dong, Anrui Chen, Ruijun Huang, Xin Zhang, Mingzhi Dong, Yujiang Wang, Jinlong Hou, Qin Lv, Robert P. Dick, Yuan Cheng, Tun Lu, Fan Yang, Yixuan Chen, Li Shang

AI总结:

发现FP4训练失败源于激活异常值由秩一均值偏差主导,提出Averis均值残差分离量化法,在Qwen3模型上实现鲁棒W4A4G4训练,损失差距低于NVIDIA的Hadamard方法。

摘要:

FP4训练有望为大型语言模型节省大量内存和计算,但由于分块量化受极端激活幅度支配,导致动态范围膨胀并压缩长尾信号,因此仍然脆弱。我们发现了这一失败的一个反直觉来源:主导激活异常值不仅仅是任意的稀疏事件,而主要是由一致的秩一均值偏差引起的,其方向与主导各向异性谱分量对齐。该均值分量在训练过程中增强,被注意力和FFN算子放大和重塑,并日益主导顶部激活幅度。至关重要的是,这一发现揭示了一个看似复杂的异常值抑制问题实际上有一个非常简单的解决方案:在量化之前隔离一致的均值。因此,我们提出了Averis,一种均值残差分割量化方法,该方法在FP4量化之前仅使用归约和逐元素减法来分离均值分量。在100B token上训练的Qwen3 0.6B密集模型和50B token上训练的Qwen3 7B A1.5B MoE模型上,Averis实现了鲁棒的W4A4G4 FP4训练,将BF16损失差距降低至1.19%/0.81%,而NVIDIA最近发布的基于Hadamard的异常值平滑方法为2.05%/1.10%,同时将下游差距限制在0.89/0.71点。Averis在vanilla NVFP4上的端到端开销仅为2.20%,约为NVIDIA基于Hadamard设计的30%,为稳定的低位LLM训练提供了一条硬件高效的路径。与Hadamard互补,Averis在结合使用时进一步将Qwen3-0.6B的损失和下游差距降低至0.94%和0.73点。代码可在以下网址获取:this https URL。

英文摘要:

FP4 training promises substantial memory and compute savings for large language models, but remains fragile because blockwise quantization is dictated by extreme activation magnitudes, which inflate dynamic range and compress long-tail signals. We identify a counterintuitive source of this failure: dominant activation outliers are not merely arbitrary sparse events, but are largely induced by a coherent rank-one mean bias, whose direction aligns with the leading anisotropic spectral component. This mean component strengthens during training, is amplified and reshaped by attention and FFN operators, and increasingly dominates top activation magnitudes. Crucially, this discovery reveals that a seemingly complex outlier-suppression problem admits a truly simple solution: isolate the coherent mean before quantization. We therefore propose Averis, a mean-residual splitting quantization method that separates the mean component using only reductions and elementwise subtractions before FP4 quantization. Across Qwen3 0.6B Dense trained on 100B tokens and Qwen3 7B A1.5B MoE trained on 50B tokens, Averis enables robust W4A4G4 FP4 training, reducing BF16 loss gaps to 1.19%/0.81% versus 2.05%/1.10% for NVIDIA's recently released Hadamard-based outlier-smoothing method, while limiting downstream gaps to 0.89/0.71 points. With only 2.20% end-to-end overhead over vanilla NVFP4, about 30% of NVIDIA's Hadamard-based design, Averis provides a hardware-efficient path to stable low-bit LLM training. Complementary to Hadamard, Averis further reduces the Qwen3-0.6B loss and downstream gaps to 0.94% and 0.73 points when combined. Code is available at: https://anonymous.4open.science/r/averis-504D.

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

↑