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

浮点量化训练的缩放定律

Scaling Laws for Floating Point Quantization Training

Tencent Hunyuan(腾讯混元);University of Macau(澳门大学);The Chinese University of Hong Kong(香港中文大学);Institute of Science Tokyo(东京科学大学)
Xingwu Sun, Shuaipeng Li, Ruobing Xie, Weidong Han, Kan Wu, Zhen Yang, Yixing Li, An Wang, Shuai Li, Jinbao Xue, Yu Cheng, Yangyu Tao, Zhanhui Kang, Chengzhong … 展开作者

Xingwu Sun, Shuaipeng Li, Ruobing Xie, Weidong Han, Kan Wu, Zhen Yang, Yixing Li, An Wang, Shuai Li, Jinbao Xue, Yu Cheng, Yangyu Tao, Zhanhui Kang, Chengzhong Xu, Di Wang, Jie Jiang

AI总结:

本文系统研究浮点量化训练中指数位、尾数位和缩放因子粒度对LLM性能的影响,提出统一缩放定律,并给出最优比特分配、临界数据规模及4-8比特最佳性价比精度等实践建议。

摘要:

低精度训练被认为是降低训练和下游推理成本的有效策略。此前关于精度的缩放定律主要关注整数量化,对浮点(FP)量化中的构成要素关注较少,因此无法很好地拟合该场景下的大语言模型(LLM)损失。相比之下,尽管浮点量化训练在生产环境中更为常用,但其研究相对较为浅显。本文深入探讨了浮点量化目标、指数位、尾数位以及缩放因子计算粒度对LLM模型浮点量化训练性能的影响。除提出一个精确的浮点量化统一缩放定律外,我们还为社区提供了有价值的建议:(1)指数位对模型性能的贡献略高于尾数位。我们给出了不同比特数下的最优指数-尾数位比例,可供硬件制造商未来参考;(2)我们发现了低精度LLM训练中临界数据规模的形成。超过临界数据规模的过多训练数据反而会导致LLM性能下降;(3)最优浮点量化精度与计算能力成正比,但在较宽的计算能力范围内成立。我们估计最佳性价比精度应位于4-8比特之间。

英文摘要:

Low-precision training is considered an effective strategy for reducing both training and downstream inference costs. Previous scaling laws for precision mainly focus on integer quantization, which pay less attention to the constituents in floating-point (FP) quantization, and thus cannot well fit the LLM losses in this scenario. In contrast, while FP quantization training is more commonly implemented in production, it's research has been relatively superficial. In this paper, we thoroughly explore the effects of FP quantization targets, exponent bits, mantissa bits, and the calculation granularity of the scaling factor in FP quantization training performance of LLM models. In addition to an accurate FP quantization unified scaling law, we also provide valuable suggestions for the community: (1) Exponent bits contribute slightly more to the model performance than mantissa bits. We provide the optimal exponent-mantissa bit ratio for different bit numbers, which is available for future reference by hardware manufacturers; (2) We discover the formation of the critical data size in low-precision LLM training. Too much training data exceeding the critical data size will inversely bring in degradation of LLM performance; (3) The optimal FP quantization precision is directly proportional to the computational power, but within a wide computational power range. We estimate that the best cost-performance precision should lie between 4-8 bits.

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

↑