动态选择浮点格式,让模型在低精度下保持高准确率
MoR: Mixture Of Representations For Mixed-Precision Training
- 根据张量数值特性,自动在FP8和BF16间切换
- 98.38%的张量可安全量化至FP8,精度接近全精度
- 无需精细划分,适合各类模型与数据集
混合精度训练是扩展深度学习模型的关键技术,但其成功依赖于合适的训练方法组合。本文提出一种新型的张量级与子张量级量化框架——表示混合(Mixture-of-Representations, MoR),通过动态分析张量的数值特性,在多种表示形式间进行自适应选择。基于该框架,我们设计并实验了在张量级和子张量级粒度下动态切换FP8与BF16表示的具体算法。该通用方法在不同量化分割策略与数据集上均能保持模型质量。初步结果表明,该方法可实现98.38%的张量量化至FP8格式,达到当前最优性能。研究展示了动态、属性感知量化在保持模型精度方面的潜力。我们认为该方法可普遍提升低精度训练的鲁棒性,不仅在不需细粒度划分的情况下实现与现有方法相当的FP8精度,还可与其它训练方法结合,进一步发挥如NVFP4等更低精度格式的潜力。
原文摘要 · Abstract (English)
Mixed-precision training is a crucial technique for scaling deep learning models, but successful mixedprecision training requires identifying and applying the right combination of training methods. This paper presents our preliminary study on Mixture-of-Representations (MoR), a novel, per-tensor and sub-tensor level quantization framework that dynamically analyzes a tensor's numerical properties to select between a variety of different representations. Based on the framework, we have proposed and experimented concrete algorithms that choose dynamically between FP8 and BF16 representations for both per-tensor and sub-tensor level granularities. Our universal approach is designed to preserve model quality across various quantization partition strategies and datasets. Our initial findings show that this approach can achieve state-of-the-art results with 98.38% of tensors quantized to the FP8 format. This work highlights the potential of dynamic, property-aware quantization while preserving model quality. We believe this approach can generally improve the robustness of low precision training, as demonstrated by achieving FP8 accuracies that are on par with existing approaches without the need for fine-grain partitioning, or can be used in combination with other training methods to improve the leverage of even lower precision number formats such as NVFP4.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。