arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2401.10432cs.LGcs.ARcs.PF
收藏

A2Q+:改进累加器感知权重量化

A2Q+: Improving Accumulator-Aware Weight Quantization

AMD SW Technology Team(AMD软件技术团队);AMD Research and Advanced Development(AMD研究与高级开发)

Ian Colbert, Alessandro Pappalardo, Jakoba Petri-Koenig, Yaman Umuroglu

AI总结:

本文针对 A2Q 约束过强和初始化次优的问题,提出改进界、浮点检查点初始化与权重归一化结合的 A2Q+,显著优化累加器位宽和准确率的权衡。

摘要:

量化技术通常通过限制权重和激活值的精度来降低神经网络的推理成本。近期研究表明,进一步降低累加器的精度可以提升硬件效率,但存在数值溢出风险,由此引入的算术误差可能降低模型准确率。为在保持准确率的同时避免数值溢出,近期工作提出了累加器感知量化(A2Q),这是一种量化感知训练方法,在训练期间约束模型权重,以便在推理时安全使用目标累加器位宽。尽管该方法展现出前景,但我们证明 A2Q 依赖于过于严格的约束和次优的权重初始化策略,二者都会引入多余的量化误差。为解决这些缺陷,我们提出:(1)一种改进的界,在不影响溢出避免的前提下缓解累加器约束;以及(2)一种从预训练浮点检查点初始化量化权重的新策略。我们将这些贡献与权重归一化相结合,提出 A2Q+。实验支持了我们的分析,表明 A2Q+ 显著改善了累加器位宽与模型准确率之间的权衡,并刻画了由累加器约束引发的新权衡。

英文摘要:

Quantization techniques commonly reduce the inference costs of neural networks by restricting the precision of weights and activations. Recent studies show that also reducing the precision of the accumulator can further improve hardware efficiency at the risk of numerical overflow, which introduces arithmetic errors that can degrade model accuracy. To avoid numerical overflow while maintaining accuracy, recent work proposed accumulator-aware quantization (A2Q), a quantization-aware training method that constrains model weights during training to safely use a target accumulator bit width during inference. Although this shows promise, we demonstrate that A2Q relies on an overly restrictive constraint and a sub-optimal weight initialization strategy that each introduce superfluous quantization error. To address these shortcomings, we introduce: (1) an improved bound that alleviates accumulator constraints without compromising overflow avoidance; and (2) a new strategy for initializing quantized weights from pre-trained floating-point checkpoints. We combine these contributions with weight normalization to introduce A2Q+. We support our analysis with experiments that show A2Q+ significantly improves the trade-off between accumulator bit width and model accuracy and characterize new trade-offs that arise as a consequence of accumulator constraints.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑