arXiv:2501.02423cs.LGcs.AR2025-01ICML被引 9

提出浮点量化训练的统一扩展定律,揭示精度与算力、数据量的关系。

Scaling Laws for Floating Point Quantization Training

  • 构建浮点量化统一扩展定律,分析指数位、尾数位及缩放粒度影响
  • 发现低精度训练存在临界数据量,超限会降低模型性能
  • 建议最佳精度4-8比特,适配不同算力场景,指导硬件设计

低精度训练是降低训练和推理成本的有效策略。以往精度扩展定律主要针对整数量化,对浮点量化中各成分关注不足,难以拟合大模型在该场景下的损失表现。尽管浮点量化更常用于生产环境,其研究仍相对薄弱。本文系统探究了浮点量化目标、指数位数、尾数位数以及缩放因子计算粒度对大模型训练性能的影响。提出准确的浮点量化统一扩展定律,并给出重要建议:(1) 指数位对模型性能影响略高于尾数位,提供不同总位数下的最优指数-尾数比,可供硬件厂商参考;(2) 发现低精度大模型训练存在临界数据规模,训练数据超过此规模反而导致性能下降;(3) 最优浮点量化精度与算力正相关,在宽算力范围内成立,预计最佳性价比精度位于4-8比特之间。

原文摘要 · Abstract (English)

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.

量化大模型扩展定律浮点量化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。