MXNorm:重用MXFP块尺度以实现高效的张量规范化
MXNorm: Reusing MXFP block scales for efficient tensor normalisation
AI总结:
MXNorm通过利用MXFP8转换中的块尺度估算RMS,实现了归一化所需减少操作规模的32倍缩减,同时在预训练Llama3模型时保持了训练精度的最小损失。
摘要:
矩阵乘法性能长期以来是深度学习工作负载扩展的主要瓶颈,这促使了设计新加速器以使用越来越低精度的数字格式。然而,矩阵乘法性能的改进远超归约和元素级计算的性能改进,后者仍以更高精度执行。在本工作中,我们提出了MXNorm,作为RMSNorm的直接替换,仅使用MXFP8转换中计算的块尺度来估计RMS,从而将归一化所需减少操作的规模减少了32倍。我们在Llama3模型的预训练中验证了我们的近似方法,发现与使用MXFP8矩阵乘法的基线RMSNorm相比,训练精度的损失最小。我们还展示了仅使用torch.compile即可实现MXNorm相对于RMSNorm的2.4倍实际内核加速,对应于MXFP8中Llama3 8B变换器层的1.3%加速,以及NVFP4中的2.6%加速。
英文摘要:
Matrix multiplication performance has long been the major bottleneck to scaling deep learning workloads, which has stimulated the design of new accelerators that use increasingly low-precision number formats. However, improvements in matrix multiplication performance have far outstripped improvements in performance on reductions and elementwise computations, which are still being performed in higher precision. In this work, we propose MXNorm, a drop-in replacement for RMSNorm that estimates the RMS using only the block scales calculated as part of the MXFP8 cast and enables a 32x decrease in the size of reduction needed for normalization. We validate our approximation method on pre-training of Llama 3 models of 125M, 1B and 8B parameters, finding minimal loss of training accuracy compared to a baseline using RMSNorm with MXFP8 matmuls. We also show practical kernel speedups using only torch.compile of up to 2.4x for MXNorm over RMSNorm, corresponding to a 1.3% speedup in Llama 3 8B transformer layers in MXFP8 and a 2.6% speedup in NVFP4.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。