arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2105.11010cs.LGcs.ARcs.CV
收藏

后训练稀疏感知Quantization

Post-Training Sparsity-Aware Quantization

Technion — Israel Institute of Technology(以色列理工学院);Ruppin Academic Center(鲁平学术中心)

Gil Shomron, Freddy Gabbay, Samer Kurzum, Uri Weiser

摘要:

量化是一种在深度神经网络(DNN)中使用的技术,用于提高执行性能和硬件效率。统一的后训练量化(PTQ)方法是常见的,因为它们可以在硬件中有效地实现,并且不需要大量的硬件资源或训练集。使用统一PTQ将FP 32模型映射到INT 8产生的模型精度下降可以忽略不计;然而,使用PTQ将精度降低到8位以下具有挑战性,因为由于量化噪声的增加,精度下降变得明显。在本文中,我们提出了一种稀疏感知量化(SPARQ)方法,在该方法中,非结构化和动态激活稀疏性在不同的表示粒度中被利用。4-例如,通过动态检查8位值的位并选择4位的窗口,同时首先跳过零值位,来采用位量化。此外,不是将逐个激活量化为4位,而是关注成对的8位激活,并检查两者之一是否等于零。如果一个等于零,则第二个可以机会性地使用另一个的4比特预算;如果两者都不等于零,则每个被动态量化为4比特,如所描述的。SPARQ实现了较小的精度下降和实际的硬件实现。该代码可在https://github.com/gilshm/sparq上获得。

英文摘要:

Quantization is a technique used in deep neural networks (DNNs) to increase execution performance and hardware efficiency. Uniform post-training quantization (PTQ) methods are common, since they can be implemented efficiently in hardware and do not require extensive hardware resources or a training set. Mapping FP32 models to INT8 using uniform PTQ yields models with negligible accuracy degradation; however, reducing precision below 8 bits with PTQ is challenging, as accuracy degradation becomes noticeable, due to the increase in quantization noise. In this paper, we propose a sparsity-aware quantization (SPARQ) method, in which the unstructured and dynamic activation sparsity is leveraged in different representation granularities. 4-bit quantization, for example, is employed by dynamically examining the bits of 8-bit values and choosing a window of 4 bits, while first skipping zero-value bits. Moreover, instead of quantizing activation-by-activation to 4 bits, we focus on pairs of 8-bit activations and examine whether one of the two is equal to zero. If one is equal to zero, the second can opportunistically use the other's 4-bit budget; if both do not equal zero, then each is dynamically quantized to 4 bits, as described. SPARQ achieves minor accuracy degradation and a practical hardware implementation. The code is available at https://github.com/gilshm/sparq.

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

↑