arXiv reaDer
ビジョントランスフォーマーのパッチごとの混合精度量子化
Patch-wise Mixed-Precision Quantization of Vision Transformer
新しいハードウェアが混合ビット幅算術計算をサポートし始めているため、ニューラル ネットワークの複雑さを軽減するために混合精度量子化が広く使用されています。ただし、ビジョン トランスフォーマー (ViT) は、強力な特徴表現の学習を保証するために複雑な自己注意計算を必要とするため、ViT の混合精度量子化は依然として困難です。この論文では、ViT を効率的に推論するための新しいパッチ単位の混合精度量子化 (PMQ) を提案します。具体的には、量子化誤差に対する ViT の各コンポーネントの感度を測定するために、既存の方法よりも高速な軽量のグローバル メトリックを設計します。さらに、感度に応じて最適なビット精度を自動的に割り当てるパレートフロンティアアプローチも導入しています。推論段階におけるセルフアテンションの計算の複雑さをさらに軽減するために、各層のパッチのビット幅を再割り当てするパッチごとのモジュールを提案します。 ImageNet データセットに対する広範な実験により、私たちの方法により検索コストが大幅に削減され、ViT への混合精度量子化の適用が容易になることがわかりました。
As emerging hardware begins to support mixed bit-width arithmetic computation, mixed-precision quantization is widely used to reduce the complexity of neural networks. However, Vision Transformers (ViTs) require complex self-attention computation to guarantee the learning of powerful feature representations, which makes mixed-precision quantization of ViTs still challenging. In this paper, we propose a novel patch-wise mixed-precision quantization (PMQ) for efficient inference of ViTs. Specifically, we design a lightweight global metric, which is faster than existing methods, to measure the sensitivity of each component in ViTs to quantization errors. Moreover, we also introduce a pareto frontier approach to automatically allocate the optimal bit-precision according to the sensitivity. To further reduce the computational complexity of self-attention in inference stage, we propose a patch-wise module to reallocate bit-width of patches in each layer. Extensive experiments on the ImageNet dataset shows that our method greatly reduces the search cost and facilitates the application of mixed-precision quantization to ViTs.
updated: Thu May 11 2023 04:34:10 GMT+0000 (UTC)
published: Thu May 11 2023 04:34:10 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アソシエイト