Schalingswetten voor training met zwevendekommagetallenquantisering
Scaling Laws for Floating Point Quantization Training
January 5, 2025
Auteurs: 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
Samenvatting
Training met lage precisie wordt beschouwd als een effectieve strategie om zowel de trainingskosten als de kosten van downstream inferentie te verlagen. Eerdere schalingswetten voor precisie richten zich voornamelijk op gehele getal kwantisering, die minder aandacht besteden aan de elementen in zwevende-kommakwantisering en daardoor niet goed passen bij de verliezen in dit scenario. Daarentegen, hoewel training met zwevende-kommakwantisering vaker wordt geïmplementeerd in productie, is het onderzoek hiernaar relatief oppervlakkig geweest. In dit artikel onderzoeken we grondig de effecten van zwevende-kommakwantiseringsdoelen, exponentbits, mantissabits, en de berekeningsgranulariteit van de schaalfactor in de prestaties van zwevende-kommakwantiseringstraining van LLM-modellen. Terwijl we een nauwkeurige zwevende-kommakwantiseringsuniforme schalingswet presenteren, bieden we ook waardevolle suggesties voor de gemeenschap: (1) Exponentbits dragen iets meer bij aan de modelprestaties dan mantissabits. We bieden de optimale exponent-mantissabitverhouding voor verschillende bitaantallen, die beschikbaar is voor toekomstige referentie door hardwarefabrikanten; (2) We ontdekken de vorming van de kritieke gegevensgrootte bij training met lage precisie van LLM. Te veel trainingsgegevens die de kritieke gegevensgrootte overschrijden, zullen omgekeerd de prestaties van LLM verslechteren; (3) De optimale precisie van zwevende-kommakwantisering is recht evenredig met het rekenvermogen, maar binnen een breed bereik van rekenvermogen schatten we dat de beste kostprestatieprecisie tussen 4-8 bits ligt.
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