更细粒度更好(配合正确的缩放)
Finer is Better (with the Right Scaling)
AI总结:
本文研究大语言模型低精度量化中的块大小悖论,发现细粒度块在正确缩放策略下能降低量化误差,并通过4-over-6方法等解决退化问题。
摘要:
微缩放是保持量化到超低精度格式的大语言模型质量的关键技术。直观上,更细的块大小应产生更低的量化误差;然而,Fasoli等人(2026)最近发现的一个悖论表明,标准abs-max缩放实际上会随着块大小减小而导致模型质量下降。在这项工作中,我们研究了这一现象背后的机制。我们证明,这种退化并非细粒度的固有限制,而主要是由于较小块中的元素在统计上更接近其局部块最大值,与用作缩放因子的粗糙非规格化E4M3值交互不良所致。具体来说,我们表明:i)防止缩放因子下溢为零可减轻极端下溢引起的误差;ii)针对性的算法干预(如4-over-6方法)为缩放因子的选择提供更多灵活性,从而解决了较大值的悖论;iii)暴力搜索建立了最优基线,证实理论均方误差随块大小细化而严格改善。最终,我们的发现突显了硬件-软件协同设计的关键见解:块大小悖论部分源于天真的缩放选择。虽然使用分层缩放因子或更宽的格式(如UE5M3)可互换地解决大部分质量损失,但我们发现4-over-6缩放选择启发式方法可以进一步改善质量,特别是对于非常小的块大小。因此,最大化下一代ML加速器的性能需要将硅片格式规范和软件缩放算法视为紧密耦合的设计选择。
英文摘要:
Microscaling is a critical technique for preserving the quality of Large Language Models (LLMs) quantized to ultra-low precision formats. Intuitively, finer block sizes should yield lower quantization error; however, a paradox recently identified by Fasoli et al. (2026) demonstrates that standard abs-max scaling can actually result in degraded model quality as block sizes shrink. In this work, we investigate the underlying mechanics of this phenomenon. We demonstrate that this degradation is not an inherent limitation of finer granularity, but is primarily driven by how elements in smaller blocks statistically cluster closer to their local block maximum, interacting poorly with the coarse subnormal E4M3 values used as scaling factors. Specifically, we show that i) preventing the scaling factor from underflowing to zero mitigates errors caused by extreme underflow, ii) targeted algorithmic interventions like the 4-over-6 methodology that give more flexibility to the choice of scaling factor resolve the paradox for larger values, and iii) a brute-force search establishes an optimal baseline, confirming that the theoretical Mean Squared Error (MSE) strictly improves with finer block sizes. Ultimately, our findings highlight a critical insight for hardware-software co-design: the block-size paradox is partially an artifact of naive scale selection. While using hierarchical scaling factors or wider formats like UE5M3 interchangeably resolves much of the quality loss, we found the 4-over-6 scale selection heuristic can even further improve quality, especially for very small block sizes. Consequently, maximizing the performance of next-generation ML accelerators will require treating silicon format specifications and software scaling algorithms as tightly coupled design choices.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。