arXiv reaDer
HeatViT: ビジョン トランスフォーマー向けのハードウェア効率の高い適応型トークン プルーニング
HeatViT: Hardware-Efficient Adaptive Token Pruning for Vision Transformers
ビジョン トランスフォーマー (ViT) は、コンピューター ビジョンの分野で新たなマイルストーンを達成し続けていますが、計算コストとメモリ コストが高い洗練されたネットワーク アーキテクチャが、リソースが限られたエッジ デバイスへの展開を妨げてきました。このホワイト ペーパーでは、組み込み FPGA での効率的かつ正確な ViT アクセラレーションのために、HeatViT と呼ばれるハードウェア効率の高い画像適応型トークン プルーニング フレームワークを提案します。 ViT に固有の計算パターンを分析することにより、まず効果的なアテンション ベースのマルチヘッド トークン セレクターを設計します。このセレクターは、Transformer ブロックの前に段階的に挿入して、入力画像から有益でないトークンを動的に識別して統合できます。さらに、バックボーン ViT 用に構築された既存のハードウェア コンポーネントを大幅に再利用するためのミニチュア制御ロジックを追加することで、トークン セレクターをハードウェアに実装します。ハードウェア効率を改善するために、8 ビットの固定小数点量子化をさらに採用し、ViT で頻繁に使用される非線形関数の量子化誤差に対する正則化効果を伴う多項式近似を提案します。最後に、ハードウェアでのモデルの精度と推論レイテンシの両方を改善するために、トークン セレクタを挿入するための変換ブロックを決定し、挿入されたトークン セレクタの望ましい (平均) プルーニング レートを最適化する、レイテンシを意識した多段階トレーニング戦略を提案します。既存の ViT プルーニング研究と比較して、同様の計算コストの下で、HeatViT は 0.7% ~ 8.9% 高い精度を達成できます。同様のモデル精度の下で、HeatViT は、DeiT-T、DeiT-S、DeiT-B、LV-ViT-S、および LV-ViT- を含むさまざまな広く使用されている ViT に対して、28.4% ~ 65.3% 以上の計算削減を達成できます。 M、ImageNet データセット。ベースラインのハードウェア アクセラレータと比較して、Xilinx ZCU102 FPGA に実装した HeatViT は 3.46 倍から 4.89 倍のスピードアップを達成しています。
While vision transformers (ViTs) have continuously achieved new milestones in the field of computer vision, their sophisticated network architectures with high computation and memory costs have impeded their deployment on resource-limited edge devices. In this paper, we propose a hardware-efficient image-adaptive token pruning framework called HeatViT for efficient yet accurate ViT acceleration on embedded FPGAs. By analyzing the inherent computational patterns in ViTs, we first design an effective attention-based multi-head token selector, which can be progressively inserted before transformer blocks to dynamically identify and consolidate the non-informative tokens from input images. Moreover, we implement the token selector on hardware by adding miniature control logic to heavily reuse existing hardware components built for the backbone ViT. To improve the hardware efficiency, we further employ 8-bit fixed-point quantization, and propose polynomial approximations with regularization effect on quantization error for the frequently used nonlinear functions in ViTs. Finally, we propose a latency-aware multi-stage training strategy to determine the transformer blocks for inserting token selectors and optimize the desired (average) pruning rates for inserted token selectors, in order to improve both the model accuracy and inference latency on hardware. Compared to existing ViT pruning studies, under the similar computation cost, HeatViT can achieve 0.7%∼8.9% higher accuracy; while under the similar model accuracy, HeatViT can achieve more than 28.4%∼65.3% computation reduction, for various widely used ViTs, including DeiT-T, DeiT-S, DeiT-B, LV-ViT-S, and LV-ViT-M, on the ImageNet dataset. Compared to the baseline hardware accelerator, our implementations of HeatViT on the Xilinx ZCU102 FPGA achieve 3.46×∼4.89× speedup.
updated: Tue Nov 15 2022 13:00:43 GMT+0000 (UTC)
published: Tue Nov 15 2022 13:00:43 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アソシエイト