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.


翻译:矩阵乘法性能长期以来一直是扩展深度学习工作负载的主要瓶颈,这促使了使用日益低精度数值格式的新型加速器设计。然而,矩阵乘法性能的提升速度远超归约运算和逐元素计算的性能提升,后者仍在使用更高精度进行计算。在本工作中,我们提出MXNorm,作为RMSNorm的即插即用替代方案,它仅利用MXFP8转换过程中计算出的块尺度来估计均方根值,从而将归一化所需的归约运算规模减小32倍。我们在参数规模为125M、1B和8B的Llama 3模型预训练中验证了我们的近似方法,发现与使用MXFP8矩阵乘法的RMSNorm基线相比,训练精度损失极小。我们还展示了仅使用torch.compile实现的实用内核加速,MXNorm相比RMSNorm最高可达2.4倍,这对应于MXFP8精度下Llama 3 8B Transformer层的1.3%加速,以及在NVFP4精度下的2.6%加速。

0
下载
关闭预览

相关内容

层次和神经非负张量分解,90页ppt
专知会员服务
24+阅读 · 2022年12月25日
【博士论文】基于冲量的加速优化算法
专知会员服务
28+阅读 · 2021年11月29日
专知会员服务
16+阅读 · 2020年7月27日
【总结】强化学习需要批归一化(Batch Norm)吗?
深度强化学习实验室
28+阅读 · 2020年10月8日
【学界】DeepMind论文:深度压缩感知,新框架提升GAN性能
GAN生成式对抗网络
14+阅读 · 2019年5月23日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Arxiv
0+阅读 · 4月4日
VIP会员
最新内容
乌克兰无人机饱和战场中的错误教训
专知会员服务
1+阅读 · 今天15:13
面向最后一战术英里:美军无人机创新尝试
专知会员服务
1+阅读 · 今天14:52
《美空军2026条令文件:对海压制作战》
专知会员服务
25+阅读 · 11月9日
人工智能与战争的未来
专知会员服务
10+阅读 · 11月8日
《Agent Mosaic:识别智能体LLM系统中的机密泄露》
专知会员服务
12+阅读 · 11月8日
人工智能在军事教育中的应用:若干视角与经验
专知会员服务
13+阅读 · 11月6日
“星链”减速与不断适应的乌克兰
专知会员服务
10+阅读 · 11月6日
美国中期选举之后:帕兰提尔面临不确定性?
专知会员服务
7+阅读 · 11月6日
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员