arXiv reaDer
トレーニング後のスパース性を意識した量子化
Post-Training Sparsity-Aware Quantization
量子化は、実行パフォーマンスとハードウェア効率を向上させるためにディープニューラルネットワーク(DNN)で使用される手法です。均一なトレーニング後の量子化(PTQ)手法は、ハードウェアに効率的に実装でき、広範なハードウェアリソースやトレーニングセットを必要としないため、一般的です。均一なPTQを使用してFP32モデルをINT8にマッピングすると、精度の低下はごくわずかです。ただし、量子化ノイズの増加により精度の低下が顕著になるため、PTQを使用して精度を8ビット未満に下げることは困難です。この論文では、スパース性を意識した量子化(SPARQ)法を提案します。この方法では、構造化されていない動的なアクティブ化スパース性がさまざまな表現粒度で活用されます。たとえば、4ビット量子化は、最初にゼロ値ビットをスキップしながら、8ビット値のビットを動的に調べて4ビットのウィンドウを選択することによって使用されます。さらに、アクティベーションごとに4ビットに量子化する代わりに、8ビットのアクティベーションのペアに焦点を当て、2つのうちの1つがゼロに等しいかどうかを調べます。一方がゼロに等しい場合、もう一方はもう一方の4ビットバジェットを日和見的に使用できます。両方がゼロに等しくない場合、説明されているように、それぞれが動的に4ビットに量子化されます。 SPARQは、わずかな精度の低下、広く使用されているハードウェアアーキテクチャの2倍の高速化、および実用的なハードウェア実装を実現します。コードは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, 2x speedup over widely used hardware architectures, and a practical hardware implementation. The code is available at https://github.com/gilshm/sparq.
updated: Sun May 23 2021 20:12:35 GMT+0000 (UTC)
published: Sun May 23 2021 20:12:35 GMT+0000 (UTC)
参考文献 (このサイトで利用可能なもの) / References (only if available on this site)
被参照文献 (このサイトで利用可能なものを新しい順に) / Citations (only if available on this site, in order of most recent)
Amazon.co.jpアソシエイト