arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2308.05600cs.LGcs.CV
收藏

NUPES:基于幂指数搜索的非均匀训练后量化

NUPES : Non-Uniform Post-Training Quantization via Power Exponent Search

Datakalab(Datakalab公司);Sorbonne Université(索邦大学);CNRS(法国国家科学研究中心);Institut des Systèmes Intelligents et de Robotique(智能系统与机器人研究所)

Edouard Yvinec, Arnaud Dapogny, Kevin Bailly

AI总结:

NUPES提出基于幂指数搜索的非均匀训练后量化方法,利用自同构保持标量乘法,并在整个量化空间学习权重和优化量化算子,在无数据与数据驱动配置下均实现领先压缩率。

摘要:

深度神经网络(DNN)的部署一直局限于较大的硬件设备,因为其计算开销昂贵。随着大型语言模型(LLM)的出现,这一挑战最近达到了另一个规模。为了减少它们的内存占用和延迟,一种有前景的技术是量化。量化是将浮点表示转换为低位宽定点表示,通常假设均匀映射到规则网格上。这一过程在文献中被称为均匀量化,然而它可能并不合适,因为大多数DNN权重和激活值遵循钟形分布。在LLM上情况更糟,因为已知其权重分布表现出较大的、高影响力的离群值。在这项工作中,我们针对深度学习模型量化中处理这一局限性的最常用方法,即非均匀量化,提出了一种改进。NUPES利用自同构来保持标量乘法。这类变换源自幂函数。然而,指数参数和权重值的优化仍然是一个具有挑战性的新问题,无法用之前的训练后优化技术解决,这些技术只学习向上或向下取整权重值以保持预测函数。我们通过一种新范式来规避这一限制:在整个量化空间上学习新的量化权重。同样,我们通过缓解所有数值不稳定性,实现了幂指数的优化,即在训练期间对量化算子本身的优化。所得的预测函数与仅整数低位推理兼容。我们展示了该方法在无数据和数据驱动两种配置下均能达到最先进的压缩率。

英文摘要:

Deep neural network (DNN) deployment has been confined to larger hardware devices due to their expensive computational requirements. This challenge has recently reached another scale with the emergence of large language models (LLMs). In order to reduce both their memory footprint and latency, a promising technique is quantization. It consists in converting floating point representations to low bit-width fixed point representations, usually by assuming a uniform mapping onto a regular grid. This process, referred to in the literature as uniform quantization, may however be ill-suited as most DNN weights and activations follow a bell-shaped distribution. This is even worse on LLMs whose weight distributions are known to exhibit large, high impact, outlier values. In this work, we propose an improvement over the most commonly adopted way to tackle this limitation in deep learning models quantization, namely, non-uniform quantization. NUPES leverages automorphisms to preserve the scalar multiplications. Such transformations are derived from power functions. However, the optimization of the exponent parameter and weight values remains a challenging and novel problem which could not be solved with previous post training optimization techniques which only learn to round up or down weight values in order to preserve the predictive function. We circumvent this limitation with a new paradigm: learning new quantized weights over the entire quantized space. Similarly, we enable the optimization of the power exponent, i.e. the optimization of the quantization operator itself during training by alleviating all the numerical instabilities. The resulting predictive function is compatible with integer-only low-bit inference. We show the ability of the method to achieve state-of-the-art compression rates in both, data-free and data-driven configurations.

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

↑