ChatPaper.aiChatPaper

INT与FP对比:细粒度低比特量化格式的全面研究

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

October 29, 2025
作者: 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
cs.AI

摘要

当代AI硬件(如英伟达Blackwell架构)正日益采用低精度浮点格式来处理大语言模型中普遍存在的激活值异常值。尽管行业呈现这一趋势,但针对不同粒度下浮点与整数量化方法的系统性对比研究仍属空白,导致算法与硬件协同设计缺乏明确指导。本文通过系统研究浮点与整数格式的权衡填补了这一空白。我们揭示了一个关键的性能分界点:虽然浮点格式在粗粒度量化中表现优异,但在细粒度(分块级)量化中的对比更为复杂。我们的全面实验表明,对于流行的8位细粒度格式(如块大小为32的MX格式),MXINT8在算法精度和硬件效率上均优于同规格浮点格式。然而在4位格式中,浮点量化(如MXFP4、NVFP4)通常具有精度优势,但我们发现当采用哈达玛变换等异常值抑制技术时,NVINT4能够超越NVFP4。我们还提出了一种对称裁剪方法,解决了细粒度低比特整数量化训练中的梯度偏差问题,使MXINT8训练实现近乎无损的性能。这些发现对当前硬件发展路径提出了挑战,证明"一刀切"的浮点方案并非最优选择,并论证了细粒度整数格式(特别是MXINT8)能为未来AI加速器提供更优的精度、功耗与效率平衡。
English
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.
PDF786February 7, 2026