arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.25602cs.LGcs.AI
收藏

INT与FP的对比:细粒度低位量化格式的综合研究

INT v.s. FP: A Comprehensive Study of Fine-Grained Low-bit Quantization Formats

The University of Hong Kong(香港大学)

Mengzhao Chen, Meng Wu, Hui Jin, Zhihang Yuan, Jing Liu, Chaoyi Zhang, Yunshui Li, Jie Huang, Jin Ma, Zeyue Xue, Zhiheng Liu, Xingyan Bin, Ping Luo

AI总结:

该研究系统对比了不同粒度下INT与FP低位量化格式的性能,发现细粒度8位MXINT8在精度和硬件效率上优于FP格式,4位场景下结合离群点缓解技术的INT也可超越FP,还提出对称裁剪法解决INT训练梯度偏差问题,为AI加速器的量化格式选型提供了新方向。

摘要:

现代AI硬件(如英伟达Blackwell架构)正越来越多地采用低精度浮点(FP)格式,以应对大语言模型(LLM)中普遍存在的激活值离群点。尽管这一行业趋势明显,但目前仍缺乏不同粒度下FP与整数(INT)量化的统一对比,导致算法与硬件协同设计缺乏明确指导。本文通过系统研究FP与INT格式之间的权衡填补了这一空白。我们揭示了一个关键的性能交叉点:FP在粗粒度量化中表现优异,但在细粒度(分块)层面的对比则更为复杂。我们的综合对比表明,对于主流的8位细粒度格式(如块大小为32的MX),MXINT8在算法精度和硬件效率上均优于对应的FP格式。然而对于4位格式,FP(如MXFP4、NVFP4)通常具有精度优势,但我们证明当采用哈达玛旋转等离群点缓解技术时,NVINT4的性能可以超过NVFP4。我们还提出了一种对称裁剪方法,解决了细粒度低位INT训练中的梯度偏差问题,使MXINT8训练实现了近乎无损的性能。这些发现对当前的硬件发展方向提出了挑战,表明一刀切的FP方案并非最优,细粒度INT格式(尤其是MXINT8)能在精度、功耗和效率之间实现更好的平衡,适用于未来的AI加速器。

英文摘要:

Modern AI hardware, such as Nvidia's Blackwell architecture, is increasingly embracing low-precision floating-point (FP) formats to handle the pervasive activation outliers in Large Language Models (LLMs). Despite this industry trend, a unified comparison of FP and integer (INT) quantization across varying granularities has been missing, leaving algorithm and hardware co-design without clear guidance. This paper fills that gap by systematically investigating the trade-offs between FP and INT formats. We reveal a critical performance crossover: while FP excels in coarse-grained quantization, the comparison at fine-grained (block-wise) levels is more nuanced. Our comprehensive comparison demonstrates that for popular 8-bit fine-grained formats (e.g., MX with block size 32), MXINT8 is superior to its FP counterpart in both algorithmic accuracy and hardware efficiency. However, for 4-bit formats, FP (e.g., MXFP4, NVFP4) often holds an accuracy advantage , though we show that NVINT4 can surpass NVFP4 when outlier-mitigation techniques like Hadamard rotation are applied. We also introduce a symmetric clipping method that resolves gradient bias in fine-grained low-bit INT training, enabling nearly lossless performance for MXINT8 training. These findings challenge the current hardware trajectory, demonstrating that a one-size-fits-all FP approach is suboptimal and advocating that fine-grained INT formats, particularly MXINT8, offer a better balance of accuracy, power, and efficiency for future AI accelerators.

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

↑