MCUFormer: Deploying Vision Transformers on Microcontrollers with Limited Memory

要約

GPU は価格が高く、エネルギー消費が大きいため、マイクロコントローラーなどの IoT デバイスにディープ モデルを展開することは、エコロジー AI に大きく貢献します。
従来の手法では、マイクロコントローラー上で高解像度画像の畳み込みニューラル ネットワーク推論を実現することに成功しましたが、多くのビジョン アプリケーションで最先端のパフォーマンスを実現するビジョン トランスフォーマーのフレームワークは依然として未開発のままです。
この論文では、メモリが非常に限られているマイクロコントローラにビジョン トランスフォーマを展開するための MCUFormer と呼ばれるハードウェア アルゴリズムの協調最適化手法を提案します。そこではトランスフォーマ アーキテクチャを共同で設計し、メモリ リソースの制約に適合する推論演算子ライブラリを構築します。
より具体的には、ワンショット ネットワーク アーキテクチャ検索 (NAS) を一般化して、マイクロコントローラーからのメモリ バジェットを考慮して最高のタスク パフォーマンスを備えた最適なアーキテクチャを発見します。そこでは、低ランク分解次元を考慮してビジョン トランスフォーマーの既存の検索スペースを拡大します。
メモリ削減のためのパッチ解像度。
ビジョン トランスフォーマーの推論オペレーター ライブラリの構築では、オペレーターの統合、パッチ埋め込み分解、トークンの上書きを通じて推論中にメモリ バッファーをスケジュールし、ビジョン トランスフォーマーのフォワード パスに適応するためにメモリ バッファーを完全に利用できるようにします。
実験結果は、当社の MCUFormer が、STM32F746 マイクロコントローラー上の 320KB メモリを使用した画像分類において、ImageNet で 73.62\% トップ 1 の精度を達成することを示しています。
コードは https://github.com/liangyn22/MCUFormer で入手できます。

要約(オリジナル)

Due to the high price and heavy energy consumption of GPUs, deploying deep models on IoT devices such as microcontrollers makes significant contributions for ecological AI. Conventional methods successfully enable convolutional neural network inference of high resolution images on microcontrollers, while the framework for vision transformers that achieve the state-of-the-art performance in many vision applications still remains unexplored. In this paper, we propose a hardware-algorithm co-optimizations method called MCUFormer to deploy vision transformers on microcontrollers with extremely limited memory, where we jointly design transformer architecture and construct the inference operator library to fit the memory resource constraint. More specifically, we generalize the one-shot network architecture search (NAS) to discover the optimal architecture with highest task performance given the memory budget from the microcontrollers, where we enlarge the existing search space of vision transformers by considering the low-rank decomposition dimensions and patch resolution for memory reduction. For the construction of the inference operator library of vision transformers, we schedule the memory buffer during inference through operator integration, patch embedding decomposition, and token overwriting, allowing the memory buffer to be fully utilized to adapt to the forward pass of the vision transformer. Experimental results demonstrate that our MCUFormer achieves 73.62\% top-1 accuracy on ImageNet for image classification with 320KB memory on STM32F746 microcontroller. Code is available at https://github.com/liangyn22/MCUFormer.

arxiv情報

著者 Yinan Liang,Ziwei Wang,Xiuwei Xu,Yansong Tang,Jie Zhou,Jiwen Lu
発行日 2023-12-21 14:56:46+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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