arXivDaily arXiv每日学术速递 周一至周五更新
北美退伍军人节(Veterans Day),12 日无更新
arXiv 2501.12428cs.LGcs.AI
收藏

SplitQuant:面向低比特神经网络量化的层拆分方法

SplitQuant: Layer Splitting for Low-Bit Neural Network Quantization

The Hong Kong University of Science and Technology(香港科技大学);Nota Inc.(Nota公司)

Jaewoo Song, Fangzhen Lin

AI总结:

本文提出 SplitQuant 方法,通过将可量化层拆分为三个数学等价层并对权重和偏置进行三簇聚类,在保留离群值的同时提高低比特量化分辨率,在 BERT-Tiny 上显著提升 INT2 量化精度。

摘要:

深度神经网络(DNN)的量化是将 DNN 的参数值从原始数据类型映射到更低精度的其他数据类型,以减小模型尺寸并加快推理速度的过程。由于原始值的范围大于量化值的范围,量化通常会将不同的原始值映射到同一个量化值,这导致量化后 DNN 的精度下降。离群值是量化分辨率下降的主要原因,因为它们扩大了原始值的范围。为了解决该问题,通常使用百分位数方法来裁剪离群值。然而,裁剪离群值存在另一个问题,即会移除 DNN 中的重要且强烈的信号。本文提出 SplitQuant,以在保留离群值的同时提高量化分辨率。SplitQuant 通过将每个可量化层拆分为三个数学上等价的层并应用不同的缩放因子,缩小了原始值的范围并减轻了离群值的影响。特别地,权重和偏置被聚类为低、中、高三个簇,以实现优化的拆分。通过使用 SplitQuant 对 DNN 进行预处理,量化算法可以获得更好的结果。SplitQuant 应用于两个 BERT-Tiny 模型,将 INT2 量化的精度分别提高了 3.3%p 和 2.1%p,达到了与原始 FP32 模型相当的精度。

英文摘要:

Quantization for deep neural networks (DNNs) is the process of mapping the parameter values of DNNs from original data types to other data types of lower precision to reduce model sizes and make inference faster. Quantization often maps different original values to a single quantized value because the range of the original values is larger than the range of the quantized values. This leads to the degradation of the accuracy of the quantized DNNs. Outliers are a main cause of the degradation of quantization resolution because they enlarge the range of original values. To solve the problem, the percentile method is often used to clip outliers. However, clipping the outliers has another problem of removing the important and strong signals in the DNNs. This paper proposes SplitQuant to keep the outliers and improve the quantization resolution at the same time. SplitQuant narrows down the range of the original values and mitigates the effect of outliers by splitting each quantizable layer into three mathematically equivalent layers and applies different scaling factors. Especially, weights and biases are clustered into lower, middle and upper clusters for optimized split. By preprocessing DNNs with SplitQuant, quantization algorithms can achieve better results. SplitQuant was applied on two BERT-Tiny models and improved the accuracy of INT2 quantization by 3.3%p and 2.1%p, achieving accuracies comparable to those of the original FP32 models.

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

↑