MX-SAFE:具有即时指数和尾数位分配的多功能推理与训练验证微缩放格式
MX-SAFE: Versatile Inference- and Training-Proof Microscaling Format with On-the-Fly Exponent and Mantissa Bit Allocation
AI总结:
提出一种名为MX-SAFE的微缩放格式,通过自适应切换宽尾数模式和亚正规FP模式,同时支持训练和直接推理,并采用基于瓦片的块设计提高硬件效率,在推理和训练中相比MXFP8 E2M5和MXFP8 E4M3分别平均提升0.05%/11.1%和3.55%/3.57%的准确率,且能耗降低24.9%。
摘要:
随着深度学习需求的增长,通过量化降低训练和推理成本变得至关重要。2022年,开放计算项目(OCP)联盟标准化了用于深度学习的窄精度格式,称为微缩放(MX)格式。MX格式是一种硬件友好的动态量化方案,通过在多个操作数之间共享8位指数来有效减小数据大小。MX格式可分为两类,各有优势:(i)MXINT,仅由尾数位组成,注重高精度;(ii)MXFP,通过允许局部指数位来提供更宽的动态范围。本文提出了一种多功能的MXFP格式,称为MX-SAFE(简称MXSF),它自适应地使用两种模式,即宽尾数模式(FP8 E2M5)和亚正规FP模式(FP5 E3M2),以支持训练和直接推理。此外,我们提出了一种基于瓦片的块设计,通过减少使用MXSF格式训练期间重量化过程的负担来提高硬件效率。由于采用了所提出的MXSF格式,与MXFP8 E2M5和MXFP8 E4M3相比,推理/全训练的平均准确率分别提高了0.05%/11.1%和3.55%/3.57%。此外,我们提出了一种支持MXSF格式的训练推理加速器,在实现与BF16基线相似准确率的同时,总能耗降低了24.9%。
英文摘要:
As the demand for deep learning grows, cost reduction through quantization has become essential for both training and inference. In 2022, the Open Compute Project (OCP) consortium standardized narrow precision formats for deep learning, called the microscaling (MX) format. The MX format is a hardware-friendly dynamic quantization scheme that effectively reduces the data size by sharing an 8-bit exponent across multiple operands. The MX format can be categorized into two types with their own strengths: (i) MXINT which focuses on a high precision consisting only of mantissa bits and (ii) MXFP which focuses on a wider dynamic range by allowing local exponent bits. In this work, we present a versatile MXFP format, called MX-SAFE (MXSF in short), that adaptively uses two modes, i.e., a wider mantissa mode (FP8 E2M5) and a subnormal FP mode (FP5 E3M2), to support both training and direct-cast inference. Furthermore, we propose a tile-based block design to increase hardware efficiency by reducing the burden of re-quantization process during the training with the MXSF format. Owing to the use of the proposed MXSF format, 0.05%/11.1% and 3.55%/3.57% improvements in accuracy, on average, for inference/full-training compared to MXFP8 E2M5 and MXFP8 E4M3 are observed, respectively. Moreover, we present a training-inference accelerator that supports the MXSF format and it achieves similar accuracy to the BF16 baseline while using 24.9% less total energy consumption.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。