Lune

NeurIPS2022顶会

EfficientFormer: Vision Transformers at MobileNet Speed

Yanyu Li, Geng Yuan, Yang Wen, Ju Hu, Georgios Evangelidis, Sergey Tulyakov, Yanzhi Wang, Jian Ren

摘要

Vision Transformers (ViT) have shown rapid progress in computer vision tasks, achieving promising results on various benchmarks. However, due to the massive number of parameters and model design, e.g., attention mechanism, ViT-based models are generally times slower than lightweight convolutional networks. Therefore, the deployment of ViT for real-time applications is particularly challenging, especially on resource-constrained hardware such as mobile devices. Recent efforts try to reduce the computation complexity of ViT through network architecture search or hybrid design with MobileNet block, yet the inference speed is still unsatisfactory. This leads to an important question: can transformers run as fast as MobileNet while obtaining high performance? To answer this, we first revisit the network architecture and operators used in ViT-based models and identify inefficient designs. Then we introduce a dimension-consistent pure transformer (without MobileNet blocks) as a design paradigm. Finally, we perform latencydriven slimming to get a series of final models dubbed EfficientFormer. Extensive experiments show the superiority of EfficientFormer in performance and speed on mobile devices. Our fastest model, EfficientFormer-L1, achieves 79.2% top-1 accuracy on ImageNet-1K with only 1.6 ms inference latency on iPhone 12 (compiled with CoreML), which runs as fast as MobileNetV2×1.4 (1.6 ms, 74.7% top-1), and our largest model, EfficientFormer-L7, obtains 83.3% accuracy with only 7.0 ms latency. Our work proves that properly designed transformers can reach extremely low latency on mobile devices while maintaining high performance 1 . On the downside, transformer models are usually times slower than competitive CNNs [17, 18] . There are many factors that limit the inference speed of ViT, including the massive number of

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 86 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • FastViT: A Fast Hybrid Vision Transformer using Structural Reparameterization 引用了 Searching for MobileNetV3
  • FastViT: A Fast Hybrid Vision Transformer using Structural Reparameterization 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • FastViT: A Fast Hybrid Vision Transformer using Structural Reparameterization 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
  • FastViT: A Fast Hybrid Vision Transformer using Structural Reparameterization 引用了 Training data-efficient image transformers & distillation through attention
  • Rethinking Vision Transformers for MobileNet Size and Speed 引用了 Searching for MobileNetV3
  • Rethinking Vision Transformers for MobileNet Size and Speed 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Rethinking Vision Transformers for MobileNet Size and Speed 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
  • Rethinking Vision Transformers for MobileNet Size and Speed 引用了 Training data-efficient image transformers & distillation through attention
  • Rethinking Vision Transformers for MobileNet Size and Speed 引用了 SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers
  • SnapFusion: Text-to-Image Diffusion Model on Mobile Devices within Two Seconds 引用了 Rethinking Vision Transformers for MobileNet Size and Speed
  • Swin Transformer: Hierarchical Vision Transformer using Shifted Windows 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Swin Transformer: Hierarchical Vision Transformer using Shifted Windows 引用了 Training data-efficient image transformers & distillation through attention
  • Rep ViT: Revisiting Mobile CNN From ViT Perspective 引用了 FastViT: A Fast Hybrid Vision Transformer using Structural Reparameterization
  • Rep ViT: Revisiting Mobile CNN From ViT Perspective 引用了 Searching for MobileNetV3
  • Rep ViT: Revisiting Mobile CNN From ViT Perspective 引用了 Rethinking Vision Transformers for MobileNet Size and Speed
  • Rep ViT: Revisiting Mobile CNN From ViT Perspective 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Rep ViT: Revisiting Mobile CNN From ViT Perspective 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
  • Rep ViT: Revisiting Mobile CNN From ViT Perspective 引用了 Training data-efficient image transformers & distillation through attention
  • Rep ViT: Revisiting Mobile CNN From ViT Perspective 引用了 SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers
  • Spike-driven Transformer 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Spike-driven Transformer 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
  • Spike-driven Transformer 引用了 Training data-efficient image transformers & distillation through attention
  • Training data-efficient image transformers & distillation through attention 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper86

  1. Rep ViT: Revisiting Mobile CNN From ViT PerspectiveAo Wang, Hui Chen, Zijia Lin, Jungong Han 等CVPR 2024 · 500 次引用
  2. Spike-driven TransformerMan Yao, Jiakui Hu, Zhaokun Zhou, Li Yuan 等NeurIPS 2023 · 368 次引用
  3. FastViT: A Fast Hybrid Vision Transformer using Structural ReparameterizationPavan Kumar Anasosalu Vasu, James Gabriel, Jeff Zhu, Oncel Tuzel 等ICCV 2023 · 341 次引用
  4. Rethinking Vision Transformers for MobileNet Size and SpeedYanyu Li, Ju Hu, Yang Wen, Georgios Evangelidis 等ICCV 2023 · 300 次引用
  5. SnapFusion: Text-to-Image Diffusion Model on Mobile Devices within Two SecondsYanyu Li, Huan Wang, Qing Jin, Ju Hu 等NeurIPS 2023 · 300 次引用

它引用的 Paper42

  1. Swin Transformer: Hierarchical Vision Transformer using Shifted WindowsZe Liu, Yutong Lin, Yue Cao, Han Hu 等ICCV 2021 · 31,683 次引用
  2. An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn 等ICLR 2021 · 21,477 次引用
  3. SegFormer: Simple and Efficient Design for Semantic Segmentation with TransformersEnze Xie, Wenhai Wang, Zhiding Yu, Anima Anandkumar 等NeurIPS 2021 · 9,661 次引用
  4. Searching for MobileNetV3Andrew Howard, Ruoming Pang, Hartwig Adam, Quoc V. Le 等ICCV 2019 · 9,163 次引用
  5. Training data-efficient image transformers & distillation through attentionHugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa 等ICML 2021 · 8,974 次引用

相关 Paper

  1. MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision TransformerSachin Mehta, Mohammad RastegariICLR 2022 · 2,162 次引用
  2. TopFormer: Token Pyramid Transformer for Mobile Semantic SegmentationWenqiang Zhang, Zilong Huang, Guozhong Luo, Tao Chen 等CVPR 2022 · 313 次引用
  3. MobileOne: An Improved One millisecond Mobile BackbonePavan Kumar Anasosalu Vasu, James Gabriel, Jeff Zhu, Oncel Tuzel 等CVPR 2023
  4. Real-time Core-Periphery Guided ViT with Smart Data Layout Selection on Mobile DevicesZhihao Shu, Xiaowei Yu, Zihao Wu, Wenqi Jia 等NeurIPS 2024 · 6 次引用
  5. ElasticViT: Conflict-aware Supernet Training for Deploying Fast Vision Transformer on Diverse Mobile DevicesChen Tang, Li Lyna Zhang, Huiqiang Jiang, Jiahang Xu 等ICCV 2023 · 15 次引用
黄昏的海面,两侧是细线勾勒的悬崖