부동 소수점 양자화 훈련을 위한 스케일링 법칙
Scaling Laws for Floating Point Quantization Training
January 5, 2025
저자: 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
cs.AI
초록
저 정밀도 훈련은 훈련 및 하류 추론 비용을 줄이는 효과적인 전략으로 간주됩니다. 이전 정밀도에 대한 스케일링 법칙은 주로 정수 양자화에 초점을 맞추었으며, 부동 소수점 양자화의 구성 요소에 대해 충분한 주의를 기울이지 않아 이러한 상황에서 LLM 손실에 잘 맞지 않습니다. 반면에, 부동 소수점 양자화 훈련은 보다 일반적으로 제작되지만, 이에 대한 연구는 비교적 피상적입니다. 본 논문에서는 부동 소수점 양자화 대상, 지수 비트, 가수 비트, 그리고 부동 소수점 양자화 훈련의 스케일링 요소의 계산 세분성이 LLM 모델의 성능에 미치는 영향을 철저히 탐구합니다. 정확한 부동 소수점 양자화 통합 스케일링 법칙을 제시하면서, 커뮤니티에 유용한 제언을 제공합니다: (1) 지수 비트가 가수 비트보다 모델 성능에 약간 더 기여합니다. 다양한 비트 수에 대한 최적의 지수-가수 비트 비율을 제시하여 하드웨어 제조업체가 참고할 수 있습니다; (2) 저 정밀도 LLM 훈련에서 중요한 데이터 크기의 형성을 발견했습니다. 중요 데이터 크기를 초과하는 과도한 훈련 데이터는 오히려 LLM 성능의 저하를 가져올 수 있습니다; (3) 최적의 부동 소수점 양자화 정밀도는 계산 능력과 직접적으로 비례하지만, 넓은 계산 능력 범위 내에서 최상의 비용-성능 정밀도는 4-8 비트 사이에 있다고 추정됩니다.
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 quantization and thus cannot well fit the LLM
losses in this scenario. In contrast, while floating-point quantization
training is more commonly implemented in production, the research on it has
been relatively superficial. In this paper, we thoroughly explore the effects
of floating-point quantization targets, exponent bits, mantissa bits, and the
calculation granularity of the scaling factor in floating-point quantization
training performance of LLM models. While presenting an accurate floating-point
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
floating-point quantization precision is directly proportional to the
computational power, but within a wide computational power range, we estimate
that the best cost-performance precision lies between 4-8 bits.Summary
AI-Generated Summary