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.45, ONNX Runtime 1.25.0 | Download |
| ONNX | w8a16 | Universal | QAIRT 2.45, ONNX Runtime 1.25.0 | Download |
| ONNX | w8a16_mixed_int16 | Universal | QAIRT 2.45, ONNX Runtime 1.25.0 | Download |
| QNN_DLC | float | Universal | QAIRT 2.45 | Download |
| QNN_DLC | w8a16 | Universal | QAIRT 2.45 | Download |
| QNN_DLC | w8a16_mixed_int16 | Universal | QAIRT 2.45 | Download |
| TFLITE | float | Universal | QAIRT 2.45 | 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® X2 Elite | 0.683 ms | 2 - 2 MB | NPU |
| LeViT | ONNX | float | Snapdragon® X Elite | 1.33 ms | 16 - 16 MB | NPU |
| LeViT | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 0.865 ms | 0 - 84 MB | NPU |
| LeViT | ONNX | float | Snapdragon® 8 Gen 1 Mobile | 1.587 ms | 1 - 84 MB | NPU |
| LeViT | ONNX | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 1.276 ms | 1 - 3 MB | NPU |
| LeViT | ONNX | float | Qualcomm® QCS8450 | 1.587 ms | 1 - 84 MB | NPU |
| LeViT | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 0.643 ms | 0 - 59 MB | NPU |
| LeViT | ONNX | float | Snapdragon® 8 Elite Mobile | 0.704 ms | 0 - 55 MB | NPU |
| LeViT | ONNX | float | Qualcomm® Dragonwing™ IQ-9075 | 1.543 ms | 1 - 3 MB | NPU |
| LeViT | ONNX | float | Qualcomm® Dragonwing™ Q-8750 | 0.704 ms | 0 - 55 MB | NPU |
| LeViT | ONNX | float | Qualcomm® Dragonwing™ IQ-X7181 | 1.33 ms | 16 - 16 MB | NPU |
| LeViT | ONNX | w8a16 | Snapdragon® X2 Elite | 0.484 ms | 1 - 1 MB | NPU |
| LeViT | ONNX | w8a16 | Snapdragon® X Elite | 1.058 ms | 8 - 8 MB | NPU |
| LeViT | ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 0.691 ms | 0 - 84 MB | NPU |
| LeViT | ONNX | w8a16 | Snapdragon® 8 Gen 1 Mobile | 1.236 ms | 0 - 86 MB | NPU |
| LeViT | ONNX | w8a16 | Qualcomm® Dragonwing™ QCS6490 | 4.087 ms | 0 - 3 MB | NPU |
| LeViT | ONNX | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 1.013 ms | 0 - 11 MB | NPU |
| LeViT | ONNX | w8a16 | Qualcomm® QCS8450 | 1.236 ms | 0 - 86 MB | NPU |
| LeViT | ONNX | w8a16 | Snapdragon® 8 Elite Mobile | 0.519 ms | 0 - 59 MB | NPU |
| LeViT | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 1.166 ms | 0 - 3 MB | NPU |
| LeViT | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 1.009 ms | 0 - 57 MB | NPU |
| LeViT | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 0.468 ms | 0 - 62 MB | NPU |
| LeViT | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-6690 | 4.301 ms | 0 - 179 MB | NPU |
| LeViT | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-7790 | 1.009 ms | 0 - 57 MB | NPU |
| LeViT | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 0.519 ms | 0 - 59 MB | NPU |
| LeViT | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 1.058 ms | 8 - 8 MB | NPU |
| LeViT | ONNX | w8a16_mixed_int16 | Snapdragon® X2 Elite | 0.509 ms | 1 - 1 MB | NPU |
| LeViT | ONNX | w8a16_mixed_int16 | Snapdragon® X Elite | 1.123 ms | 11 - 11 MB | NPU |
| LeViT | ONNX | w8a16_mixed_int16 | Snapdragon® 8 Gen 3 Mobile | 0.735 ms | 0 - 85 MB | NPU |
| LeViT | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 1.064 ms | 0 - 3 MB | NPU |
| LeViT | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-9075 | 1.205 ms | 0 - 3 MB | NPU |
| LeViT | ONNX | w8a16_mixed_int16 | Snapdragon® 7 Gen 4 Mobile | 1.065 ms | 0 - 59 MB | NPU |
| LeViT | ONNX | w8a16_mixed_int16 | Snapdragon® 8 Elite Gen 5 Mobile | 0.499 ms | 0 - 64 MB | NPU |
| LeViT | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-6690 | 4.736 ms | 0 - 183 MB | NPU |
| LeViT | ONNX | w8a16_mixed_int16 | Snapdragon® 8 Elite Mobile | 0.545 ms | 0 - 56 MB | NPU |
| LeViT | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-7790 | 1.065 ms | 0 - 59 MB | NPU |
| LeViT | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-8750 | 0.545 ms | 0 - 56 MB | NPU |
| LeViT | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-X7181 | 1.123 ms | 11 - 11 MB | NPU |
| LeViT | QNN_DLC | float | Snapdragon® X2 Elite | 0.96 ms | 1 - 1 MB | NPU |
| LeViT | QNN_DLC | float | Snapdragon® X Elite | 1.802 ms | 1 - 1 MB | NPU |
| LeViT | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 1.069 ms | 0 - 84 MB | NPU |
| LeViT | QNN_DLC | float | Snapdragon® 8 Gen 1 Mobile | 2.375 ms | 0 - 81 MB | NPU |
| LeViT | QNN_DLC | float | Qualcomm® QCS8275 | 3.775 ms | 0 - 57 MB | NPU |
| LeViT | QNN_DLC | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 1.594 ms | 1 - 2 MB | NPU |
| LeViT | QNN_DLC | float | Qualcomm® SA8775P | 1.992 ms | 1 - 60 MB | NPU |
| LeViT | QNN_DLC | float | Qualcomm® SA8650P | 1.992 ms | 1 - 60 MB | NPU |
| LeViT | QNN_DLC | float | Qualcomm® SA8255P | 1.992 ms | 1 - 60 MB | NPU |
| LeViT | QNN_DLC | float | Qualcomm® QCS8450 | 2.375 ms | 0 - 81 MB | NPU |
| LeViT | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 0.723 ms | 1 - 63 MB | NPU |
| LeViT | QNN_DLC | float | Snapdragon® 8 Elite Mobile | 0.829 ms | 0 - 64 MB | NPU |
| LeViT | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-9075 | 1.818 ms | 1 - 3 MB | NPU |
| LeViT | QNN_DLC | float | Qualcomm® SA7255P | 3.775 ms | 0 - 57 MB | NPU |
| LeViT | QNN_DLC | float | Qualcomm® SA8295P | 2.351 ms | 0 - 52 MB | NPU |
| LeViT | QNN_DLC | float | Qualcomm® Dragonwing™ Q-8750 | 0.829 ms | 0 - 64 MB | NPU |
| LeViT | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-X7181 | 1.802 ms | 1 - 1 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Snapdragon® X2 Elite | 0.783 ms | 0 - 0 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Snapdragon® X Elite | 1.591 ms | 0 - 0 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Snapdragon® 8 Gen 3 Mobile | 0.932 ms | 0 - 78 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Qualcomm® QCS8275 | 2.792 ms | 0 - 50 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 1.385 ms | 0 - 13 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Qualcomm® SA8775P | 1.69 ms | 0 - 53 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Qualcomm® SA8650P | 1.69 ms | 0 - 53 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Qualcomm® SA8255P | 1.69 ms | 0 - 53 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Snapdragon® 8 Elite Mobile | 0.659 ms | 0 - 47 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 1.528 ms | 2 - 4 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Qualcomm® SA7255P | 2.792 ms | 0 - 50 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Snapdragon® 7 Gen 4 Mobile | 1.416 ms | 0 - 50 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 0.567 ms | 0 - 55 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-6690 | 5.534 ms | 0 - 174 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-7790 | 1.416 ms | 0 - 50 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 0.659 ms | 0 - 47 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 1.591 ms | 0 - 0 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Snapdragon® X2 Elite | 0.841 ms | 1 - 1 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Snapdragon® X Elite | 1.659 ms | 0 - 0 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 8 Gen 3 Mobile | 0.96 ms | 0 - 72 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Qualcomm® QCS8275 | 2.912 ms | 0 - 51 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 1.46 ms | 0 - 32 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Qualcomm® SA8775P | 1.766 ms | 0 - 53 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Qualcomm® SA8650P | 1.766 ms | 0 - 53 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Qualcomm® SA8255P | 1.766 ms | 0 - 53 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-9075 | 1.596 ms | 2 - 4 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 7 Gen 4 Mobile | 1.439 ms | 0 - 52 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 8 Elite Gen 5 Mobile | 0.612 ms | 0 - 53 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-6690 | 5.592 ms | 0 - 176 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 8 Elite Mobile | 0.697 ms | 0 - 49 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Qualcomm® SA7255P | 2.912 ms | 0 - 51 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-7790 | 1.439 ms | 0 - 52 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-8750 | 0.697 ms | 0 - 49 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-X7181 | 1.659 ms | 0 - 0 MB | NPU |
| LeViT | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 1.036 ms | 0 - 91 MB | NPU |
| LeViT | TFLITE | float | Snapdragon® 8 Gen 1 Mobile | 2.353 ms | 0 - 84 MB | NPU |
| LeViT | TFLITE | float | Qualcomm® QCS8275 | 3.987 ms | 0 - 62 MB | NPU |
| LeViT | TFLITE | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 1.501 ms | 0 - 3 MB | NPU |
| LeViT | TFLITE | float | Qualcomm® SA8775P | 1.99 ms | 0 - 63 MB | NPU |
| LeViT | TFLITE | float | Qualcomm® SA8650P | 1.99 ms | 0 - 63 MB | NPU |
| LeViT | TFLITE | float | Qualcomm® SA8255P | 1.99 ms | 0 - 63 MB | NPU |
| LeViT | TFLITE | float | Qualcomm® QCS8450 | 2.353 ms | 0 - 84 MB | NPU |
| LeViT | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 0.658 ms | 0 - 69 MB | NPU |
| LeViT | TFLITE | float | Snapdragon® 8 Elite Mobile | 0.782 ms | 0 - 69 MB | NPU |
| LeViT | TFLITE | float | Qualcomm® Dragonwing™ IQ-9075 | 1.81 ms | 0 - 19 MB | NPU |
| LeViT | TFLITE | float | Qualcomm® SA7255P | 3.987 ms | 0 - 62 MB | NPU |
| LeViT | TFLITE | float | Qualcomm® SA8295P | 2.341 ms | 0 - 53 MB | NPU |
| LeViT | TFLITE | float | Qualcomm® Dragonwing™ Q-8750 | 0.782 ms | 0 - 69 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.
