--- library_name: pytorch license: apache-2.0 tags: - bu_auto - android pipeline_tag: image-classification --- ![](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/efficientformer/web-assets/model_demo.png) # EfficientFormer: Optimized for Qualcomm Devices EfficientFormer is a vision transformer model that can classify images from the Imagenet dataset. This is based on the implementation of EfficientFormer found [here](https://github.com/snap-research/EfficientFormer). This repository contains pre-exported model files optimized for Qualcomm® devices. You can use the [Qualcomm® AI Hub Models](https://github.com/qualcomm/ai-hub-models/blob/v0.68.0/src/qai_hub_models/models/efficientformer) library to export with custom configurations. More details on model performance across various devices, can be found [here](#performance-summary). Qualcomm AI Hub Models uses [Qualcomm AI Hub Workbench](https://workbench.aihub.qualcomm.com) to compile, profile, and evaluate this model. [Sign up](https://myaccount.qualcomm.com/signup) to run these models on a hosted Qualcomm® device. ## Getting Started There are two ways to deploy this model on your device: ### Option 1: Download Pre-Exported Models Below are pre-exported model assets ready for deployment. | Runtime | Precision | Chipset | SDK Versions | Download | |---|---|---|---|---| | ONNX | float | Universal | QAIRT 2.51, ONNX Runtime 1.30.0 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/efficientformer/releases/v0.68.0/efficientformer-onnx-float.zip) | ONNX | w8a16 | Universal | QAIRT 2.51, ONNX Runtime 1.30.0 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/efficientformer/releases/v0.68.0/efficientformer-onnx-w8a16.zip) | QNN_DLC | float | Universal | QAIRT 2.51 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/efficientformer/releases/v0.68.0/efficientformer-qnn_dlc-float.zip) | QNN_DLC | w8a16 | Universal | QAIRT 2.51 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/efficientformer/releases/v0.68.0/efficientformer-qnn_dlc-w8a16.zip) | TFLITE | float | Universal | QAIRT 2.51 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/efficientformer/releases/v0.68.0/efficientformer-tflite-float.zip) For more device-specific assets and performance metrics, visit **[EfficientFormer on Qualcomm® AI Hub](https://aihub.qualcomm.com/models/efficientformer)**. ### Option 2: Export with Custom Configurations Use the [Qualcomm® AI Hub Models](https://github.com/qualcomm/ai-hub-models/blob/v0.68.0/src/qai_hub_models/models/efficientformer) Python library to compile and export the model with your own: - Custom weights (e.g., fine-tuned checkpoints) - Custom input shapes - Target device and runtime configurations This option is ideal if you need to customize the model beyond the default configuration provided here. See our repository for [EfficientFormer on GitHub](https://github.com/qualcomm/ai-hub-models/blob/v0.68.0/src/qai_hub_models/models/efficientformer) for usage instructions. ## Model Details **Model Type:** Model_use_case.image_classification **Model Stats:** - Input resolution: 224x224 - Model checkpoint: efficientformer_l1_300d - Model size (float): 46.9 MB - Model size (w8a16): 12.2 MB - Number of parameters: 12.3M ## Performance Summary | Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit |---|---|---|---|---|---|--- | EfficientFormer | ONNX | float | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 0.574 ms | 0 - 46 MB | NPU | EfficientFormer | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 0.642 ms | 0 - 49 MB | NPU | EfficientFormer | ONNX | float | Snapdragon® X2 Elite | 0.551 ms | 2 - 2 MB | NPU | EfficientFormer | ONNX | float | Snapdragon® X Elite | 1.209 ms | 25 - 25 MB | NPU | EfficientFormer | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 0.831 ms | 0 - 81 MB | NPU | EfficientFormer | ONNX | float | Snapdragon® 8 Gen 1 Mobile | 4.979 ms | 1 - 83 MB | NPU | EfficientFormer | ONNX | float | Qualcomm® Dragonwing™ IQ-8275 | 1.434 ms | 1 - 5 MB | NPU | EfficientFormer | ONNX | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 1.158 ms | 0 - 29 MB | NPU | EfficientFormer | ONNX | float | Qualcomm® QCS8450 | 4.979 ms | 1 - 83 MB | NPU | EfficientFormer | ONNX | float | Qualcomm® Dragonwing™ IQ-9075 | 1.446 ms | 1 - 4 MB | NPU | EfficientFormer | ONNX | float | Qualcomm® Dragonwing™ IQ-X7181 | 1.209 ms | 25 - 25 MB | NPU | EfficientFormer | ONNX | float | Qualcomm® Dragonwing™ Q-8750 | 0.642 ms | 0 - 49 MB | NPU | EfficientFormer | ONNX | float | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 0.51 ms | 1 - 44 MB | NPU | EfficientFormer | ONNX | float | Snapdragon® 8 Elite Gen 6 Mobile | 0.599 ms | 1 - 45 MB | NPU | EfficientFormer | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 0.458 ms | 0 - 68 MB | NPU | EfficientFormer | ONNX | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 0.534 ms | 0 - 63 MB | NPU | EfficientFormer | ONNX | w8a16 | Snapdragon® X2 Elite | 0.477 ms | 1 - 1 MB | NPU | EfficientFormer | ONNX | w8a16 | Snapdragon® X Elite | 1.262 ms | 12 - 12 MB | NPU | EfficientFormer | ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 0.825 ms | 0 - 87 MB | NPU | EfficientFormer | ONNX | w8a16 | Snapdragon® 8 Gen 1 Mobile | 1.503 ms | 0 - 92 MB | NPU | EfficientFormer | ONNX | w8a16 | Qualcomm® Dragonwing™ QCS6490 | 2.968 ms | 0 - 4 MB | NPU | EfficientFormer | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-8275 | 1.088 ms | 0 - 5 MB | NPU | EfficientFormer | ONNX | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 1.213 ms | 0 - 16 MB | NPU | EfficientFormer | ONNX | w8a16 | Qualcomm® QCS8450 | 1.503 ms | 0 - 92 MB | NPU | EfficientFormer | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 1.285 ms | 0 - 4 MB | NPU | EfficientFormer | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 1.262 ms | 12 - 12 MB | NPU | EfficientFormer | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-6690 | 5.905 ms | 0 - 71 MB | NPU | EfficientFormer | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-7790 | 1.348 ms | 0 - 68 MB | NPU | EfficientFormer | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 0.534 ms | 0 - 63 MB | NPU | EfficientFormer | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 1.348 ms | 0 - 68 MB | NPU | EfficientFormer | ONNX | w8a16 | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 0.332 ms | 0 - 63 MB | NPU | EfficientFormer | ONNX | w8a16 | Snapdragon® 8 Elite Gen 6 Mobile | 0.422 ms | 0 - 63 MB | NPU | EfficientFormer | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 0.661 ms | 0 - 44 MB | NPU | EfficientFormer | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 0.752 ms | 0 - 47 MB | NPU | EfficientFormer | QNN_DLC | float | Snapdragon® X2 Elite | 0.937 ms | 0 - 0 MB | NPU | EfficientFormer | QNN_DLC | float | Snapdragon® X Elite | 1.672 ms | 1 - 1 MB | NPU | EfficientFormer | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 1.032 ms | 0 - 76 MB | NPU | EfficientFormer | QNN_DLC | float | Snapdragon® 8 Gen 1 Mobile | 5.427 ms | 0 - 82 MB | NPU | EfficientFormer | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-8275 | 1.62 ms | 0 - 3 MB | NPU | EfficientFormer | QNN_DLC | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 1.44 ms | 0 - 2 MB | NPU | EfficientFormer | QNN_DLC | float | Qualcomm® QCS8450 | 5.427 ms | 0 - 82 MB | NPU | EfficientFormer | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-9075 | 1.741 ms | 0 - 2 MB | NPU | EfficientFormer | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-X7181 | 1.672 ms | 1 - 1 MB | NPU | EfficientFormer | QNN_DLC | float | Qualcomm® Dragonwing™ Q-8750 | 0.752 ms | 0 - 47 MB | NPU | EfficientFormer | QNN_DLC | float | Qualcomm® SA8295P | 3.83 ms | 0 - 43 MB | NPU | EfficientFormer | QNN_DLC | float | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 0.555 ms | 0 - 44 MB | NPU | EfficientFormer | QNN_DLC | float | Snapdragon® 8 Elite Gen 6 Mobile | 0.654 ms | 0 - 43 MB | NPU | EfficientFormer | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 0.585 ms | 0 - 56 MB | NPU | EfficientFormer | QNN_DLC | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 0.682 ms | 0 - 51 MB | NPU | EfficientFormer | QNN_DLC | w8a16 | Snapdragon® X2 Elite | 0.786 ms | 0 - 0 MB | NPU | EfficientFormer | QNN_DLC | w8a16 | Snapdragon® X Elite | 1.769 ms | 0 - 0 MB | NPU | EfficientFormer | QNN_DLC | w8a16 | Snapdragon® 8 Gen 3 Mobile | 1.022 ms | 0 - 75 MB | NPU | EfficientFormer | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-8275 | 1.39 ms | 0 - 3 MB | NPU | EfficientFormer | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 1.535 ms | 1 - 3 MB | NPU | EfficientFormer | QNN_DLC | w8a16 | Qualcomm® SA8650P | 1.762 ms | 0 - 62 MB | NPU | EfficientFormer | QNN_DLC | w8a16 | Qualcomm® SA8255P | 1.762 ms | 0 - 62 MB | NPU | EfficientFormer | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 1.606 ms | 2 - 5 MB | NPU | EfficientFormer | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 1.769 ms | 0 - 0 MB | NPU | EfficientFormer | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-6690 | 6.917 ms | 0 - 173 MB | NPU | EfficientFormer | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-7790 | 1.695 ms | 0 - 64 MB | NPU | EfficientFormer | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 0.682 ms | 0 - 51 MB | NPU | EfficientFormer | QNN_DLC | w8a16 | Snapdragon® 7 Gen 4 Mobile | 1.695 ms | 0 - 64 MB | NPU | EfficientFormer | QNN_DLC | w8a16 | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 0.482 ms | 0 - 56 MB | NPU | EfficientFormer | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 6 Mobile | 0.688 ms | 0 - 55 MB | NPU | EfficientFormer | TFLITE | float | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 0.655 ms | 0 - 55 MB | NPU | EfficientFormer | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 0.746 ms | 0 - 61 MB | NPU | EfficientFormer | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 1.032 ms | 0 - 92 MB | NPU | EfficientFormer | TFLITE | float | Snapdragon® 8 Gen 1 Mobile | 5.477 ms | 0 - 102 MB | NPU | EfficientFormer | TFLITE | float | Qualcomm® Dragonwing™ IQ-8275 | 1.718 ms | 0 - 29 MB | NPU | EfficientFormer | TFLITE | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 1.428 ms | 0 - 40 MB | NPU | EfficientFormer | TFLITE | float | Qualcomm® SA8775P | 9.003 ms | 0 - 24 MB | GPU | EfficientFormer | TFLITE | float | Qualcomm® SA8650P | 9.003 ms | 0 - 24 MB | GPU | EfficientFormer | TFLITE | float | Qualcomm® SA8255P | 9.003 ms | 0 - 24 MB | GPU | EfficientFormer | TFLITE | float | Qualcomm® QCS8450 | 5.477 ms | 0 - 102 MB | NPU | EfficientFormer | TFLITE | float | Qualcomm® Dragonwing™ IQ-9075 | 1.824 ms | 0 - 29 MB | NPU | EfficientFormer | TFLITE | float | Qualcomm® Dragonwing™ Q-8750 | 0.746 ms | 0 - 61 MB | NPU | EfficientFormer | TFLITE | float | Qualcomm® SA7255P | 18.287 ms | 0 - 24 MB | GPU | EfficientFormer | TFLITE | float | Qualcomm® SA8295P | 4.086 ms | 0 - 53 MB | NPU | EfficientFormer | TFLITE | float | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 0.566 ms | 0 - 59 MB | NPU | EfficientFormer | TFLITE | float | Snapdragon® 8 Elite Gen 6 Mobile | 0.675 ms | 0 - 58 MB | NPU ## License * The license for the original implementation of EfficientFormer can be found [here](https://github.com/snap-research/EfficientFormer?tab=License-1-ov-file#readme). ## References * [Rethinking Vision Transformers for MobileNet Size and Speed](https://arxiv.org/abs/2212.08059) * [Source Model Implementation](https://github.com/snap-research/EfficientFormer) ## Community * Join [our AI Hub Slack community](https://aihub.qualcomm.com/community/slack) to collaborate, post questions and learn more about on-device AI. * For questions or feedback please [reach out to us](mailto:ai-hub-support@qti.qualcomm.com).