arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.19026cs.LGcs.ARcs.CL
收藏

更细更好吗?微缩格式在大语言模型中的局限性

Is Finer Better? The Limits of Microscaling Formats in Large Language Models

IBM Research, USA(IBM研究院,美国)

Andrea Fasoli, Monodeep Kar, Chi-Chun Liu, Swagath Venkataramani, Viji Srinivasan, Leland Chang, Naigang Wang

AI总结:

研究发现微缩格式中块大小过小会导致模型输出退化,提出 FP8 无符号 E5M3 作为更高效的硬件友好格式,提升大语言模型的压缩性能。

摘要:

微缩数据格式利用每块张量量化来实现 aggressive 模型压缩,同时保持较小的精度损失。解锁其在高效训练和推理中的潜力需要硬件友好的实现,这些实现能够以原生格式处理矩阵乘法并采用高效的误差缓解策略。在此,我们报告了一种与微缩量化相关的令人惊讶的行为,即量化模型的输出在块大小降低到某个阈值以下时会退化。这种行为与预期相矛盾,即更小的块大小应允许更精确地表示张量元素。我们通过实验和理论研究探讨了这一现象,解耦了其背后量化误差的来源。实验上,我们分析了几个大型语言模型的分布,并识别了驱动异常行为的条件。理论上,我们建立了一个框架,与预训练模型分布和理想数据的实验数据有显著的一致性。总体而言,我们显示异常是由狭窄的张量分布和量化尺度的有限动态范围之间的相互作用驱动的。基于这些见解,我们提出使用 FP8 无符号 E5M3(UE5M3)作为 FP4 微缩数据类型中尺度的新型硬件友好的格式。我们证明 UE5M3 在性能上与传统的 FP8 无符号 E4M3 尺度相当,同时消除了对权重和激活的全局缩放操作的需要。

英文摘要:

Microscaling data formats leverage per-block tensor quantization to enable aggressive model compression with limited loss in accuracy. Unlocking their potential for efficient training and inference necessitates hardware-friendly implementations that handle matrix multiplications in a native format and adopt efficient error-mitigation strategies. Herein, we report the emergence of a surprising behavior associated with microscaling quantization, whereas the output of a quantized model degrades as block size is decreased below a given threshold. This behavior clashes with the expectation that a smaller block size should allow for a better representation of the tensor elements. We investigate this phenomenon both experimentally and theoretically, decoupling the sources of quantization error behind it. Experimentally, we analyze the distributions of several Large Language Models and identify the conditions driving the anomalous behavior. Theoretically, we lay down a framework showing remarkable agreement with experimental data from pretrained model distributions and ideal ones. Overall, we show that the anomaly is driven by the interplay between narrow tensor distributions and the limited dynamic range of the quantized scales. Based on these insights, we propose the use of FP8 unsigned E5M3 (UE5M3) as a novel hardware-friendly format for the scales in FP4 microscaling data types. We demonstrate that UE5M3 achieves comparable performance to the conventional FP8 unsigned E4M3 scales while obviating the need of global scaling operations on weights and activations.

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

↑