Patch-wise Mixed-Precision Quantization of Vision Transformer

要約

タイトル:Vision Transformerのパッチごとの混合精度量子化
要約:

– ミックスビット幅演算処理をサポートするようになり、混合精度量子化はニューラルネットワークの複雑さを減らすために広く使用されています。
– ただし、ビジョン・トランスフォーマーの場合、強力な特徴表現の学習を保証するために複雑なセルフアテンション計算が必要であり、ビジョン・トランスフォーマーの混合精度量子化は依然として課題が残ります。
– 本論文では、ViTsの効率的な推論のための新しいパッチごとの混合精度量子化(PMQ)を提案しています。具体的には、ViTs内の各コンポーネントの量子化エラーに対する感度を測定するための軽量なグローバルメトリックを設計します。また、感度に応じて最適なビット精度を自動的に割り当てるペアトフロンティアアプローチも導入しています。
– 推論段階におけるセルフアテンションの計算複雑度をさらに減らすために、各層のパッチのビット幅を再割り当てするパッチごとのモジュールを提案しています。
– ImageNetデータセットでの広範な実験で、我々の手法は探索コストを大幅に削減し、混合精度量子化をViTsに適用しやすくします。

要約(オリジナル)

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.

arxiv情報

著者 Junrui Xiao,Zhikai Li,Lianwei Yang,Qingyi Gu
発行日 2023-05-11 04:34:10+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, OpenAI

カテゴリー: cs.CV パーマリンク