LeViT: Optimized for Qualcomm Devices
LeViT is a vision transformer model that can classify images from the Imagenet dataset.
This is based on the implementation of LeViT found here. This repository contains pre-exported model files optimized for Qualcomm® devices. You can use the Qualcomm® AI Hub Models library to export with custom configurations. More details on model performance across various devices, can be found here.
Qualcomm AI Hub Models uses Qualcomm AI Hub Workbench to compile, profile, and evaluate this model. Sign up 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.37, ONNX Runtime 1.23.0 | Download |
| ONNX | w8a16 | Universal | QAIRT 2.37, ONNX Runtime 1.23.0 | Download |
| ONNX | w8a16_mixed_int16 | Universal | QAIRT 2.37, ONNX Runtime 1.23.0 | Download |
| QNN_DLC | float | Universal | QAIRT 2.42 | Download |
| QNN_DLC | w8a16 | Universal | QAIRT 2.42 | Download |
| QNN_DLC | w8a16_mixed_int16 | Universal | QAIRT 2.42 | Download |
| TFLITE | float | Universal | QAIRT 2.42, TFLite 2.17.0 | Download |
For more device-specific assets and performance metrics, visit LeViT on Qualcomm® AI Hub.
Option 2: Export with Custom Configurations
Use the Qualcomm® AI Hub Models 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 LeViT on GitHub for usage instructions.
Model Details
Model Type: Model_use_case.image_classification
Model Stats:
- Model checkpoint: LeViT-128S
- Input resolution: 224x224
- Number of parameters: 7.82M
- Model size (float): 29.9 MB
- Model size (w8a16): 8.83 MB
Performance Summary
| Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit |
|---|---|---|---|---|---|---|
| LeViT | ONNX | float | Snapdragon® X Elite | 1.467 ms | 16 - 16 MB | NPU |
| LeViT | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 1.094 ms | 0 - 148 MB | NPU |
| LeViT | ONNX | float | Qualcomm® QCS8550 (Proxy) | 1.51 ms | 0 - 22 MB | NPU |
| LeViT | ONNX | float | Qualcomm® QCS9075 | 1.841 ms | 1 - 3 MB | NPU |
| LeViT | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 0.899 ms | 0 - 124 MB | NPU |
| LeViT | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 0.818 ms | 0 - 123 MB | NPU |
| LeViT | QNN_DLC | float | Snapdragon® X Elite | 1.796 ms | 1 - 1 MB | NPU |
| LeViT | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 1.073 ms | 0 - 82 MB | NPU |
| LeViT | QNN_DLC | float | Qualcomm® QCS8275 (Proxy) | 3.802 ms | 1 - 59 MB | NPU |
| LeViT | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 1.556 ms | 1 - 2 MB | NPU |
| LeViT | QNN_DLC | float | Qualcomm® QCS9075 | 1.872 ms | 3 - 5 MB | NPU |
| LeViT | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 2.373 ms | 0 - 81 MB | NPU |
| LeViT | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 0.828 ms | 0 - 58 MB | NPU |
| LeViT | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 0.733 ms | 1 - 62 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Snapdragon® X Elite | 1.633 ms | 0 - 0 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Snapdragon® 8 Gen 3 Mobile | 1.005 ms | 0 - 61 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Qualcomm® QCS8275 (Proxy) | 2.968 ms | 0 - 41 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Qualcomm® QCS8550 (Proxy) | 1.426 ms | 0 - 14 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Qualcomm® QCS9075 | 1.725 ms | 0 - 2 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Qualcomm® QCM6690 | 5.551 ms | 0 - 165 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 0.738 ms | 0 - 42 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Snapdragon® 7 Gen 4 Mobile | 1.461 ms | 0 - 39 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 0.634 ms | 0 - 42 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Snapdragon® X Elite | 1.692 ms | 0 - 0 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 8 Gen 3 Mobile | 1.014 ms | 0 - 62 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Qualcomm® QCS8275 (Proxy) | 3.041 ms | 0 - 40 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Qualcomm® QCS8550 (Proxy) | 1.465 ms | 0 - 2 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Qualcomm® QCS9075 | 1.726 ms | 0 - 2 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Qualcomm® QCM6690 | 5.877 ms | 0 - 166 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 8 Elite For Galaxy Mobile | 0.753 ms | 0 - 41 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 7 Gen 4 Mobile | 1.496 ms | 0 - 39 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 8 Elite Gen 5 Mobile | 0.647 ms | 0 - 41 MB | NPU |
| LeViT | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 1.035 ms | 0 - 97 MB | NPU |
| LeViT | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 4.035 ms | 0 - 70 MB | NPU |
| LeViT | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 1.514 ms | 0 - 3 MB | NPU |
| LeViT | TFLITE | float | Qualcomm® QCS9075 | 1.883 ms | 0 - 19 MB | NPU |
| LeViT | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 2.348 ms | 0 - 93 MB | NPU |
| LeViT | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 0.787 ms | 0 - 77 MB | NPU |
| LeViT | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 0.679 ms | 0 - 78 MB | NPU |
License
- The license for the original implementation of LeViT can be found here.
References
Community
- Join our AI Hub Slack community to collaborate, post questions and learn more about on-device AI.
- For questions or feedback please reach out to us.
