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.42, ONNX Runtime 1.24.1 | Download |
| ONNX | w8a16 | Universal | QAIRT 2.42, ONNX Runtime 1.24.1 | Download |
| ONNX | w8a16_mixed_int16 | Universal | QAIRT 2.42, ONNX Runtime 1.24.1 | Download |
| QNN_DLC | float | Universal | QAIRT 2.43 | Download |
| QNN_DLC | w8a16 | Universal | QAIRT 2.43 | Download |
| QNN_DLC | w8a16_mixed_int16 | Universal | QAIRT 2.43 | Download |
| TFLITE | float | Universal | QAIRT 2.43, 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® 8 Elite Gen 5 Mobile | 0.655 ms | 1 - 77 MB | NPU |
| LeViT | ONNX | float | Snapdragon® X2 Elite | 0.692 ms | 16 - 16 MB | NPU |
| LeViT | ONNX | float | Snapdragon® X Elite | 1.464 ms | 16 - 16 MB | NPU |
| LeViT | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 0.861 ms | 0 - 93 MB | NPU |
| LeViT | ONNX | float | Qualcomm® QCS8550 (Proxy) | 1.252 ms | 0 - 25 MB | NPU |
| LeViT | ONNX | float | Qualcomm® QCS9075 | 1.656 ms | 1 - 3 MB | NPU |
| LeViT | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 0.707 ms | 0 - 67 MB | NPU |
| LeViT | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 0.469 ms | 0 - 62 MB | NPU |
| LeViT | ONNX | w8a16 | Snapdragon® X2 Elite | 0.5 ms | 8 - 8 MB | NPU |
| LeViT | ONNX | w8a16 | Snapdragon® X Elite | 1.239 ms | 8 - 8 MB | NPU |
| LeViT | ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 0.713 ms | 0 - 88 MB | NPU |
| LeViT | ONNX | w8a16 | Qualcomm® QCS6490 | 46.135 ms | 11 - 16 MB | CPU |
| LeViT | ONNX | w8a16 | Qualcomm® QCS8550 (Proxy) | 1.039 ms | 0 - 13 MB | NPU |
| LeViT | ONNX | w8a16 | Qualcomm® QCS9075 | 1.262 ms | 0 - 3 MB | NPU |
| LeViT | ONNX | w8a16 | Qualcomm® QCM6690 | 18.543 ms | 2 - 12 MB | CPU |
| LeViT | ONNX | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 0.538 ms | 0 - 60 MB | NPU |
| LeViT | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 14.66 ms | 11 - 20 MB | CPU |
| LeViT | ONNX | w8a16_mixed_int16 | Snapdragon® 8 Elite Gen 5 Mobile | 0.485 ms | 0 - 61 MB | NPU |
| LeViT | ONNX | w8a16_mixed_int16 | Snapdragon® X2 Elite | 0.509 ms | 10 - 10 MB | NPU |
| LeViT | ONNX | w8a16_mixed_int16 | Snapdragon® X Elite | 1.277 ms | 10 - 10 MB | NPU |
| LeViT | ONNX | w8a16_mixed_int16 | Snapdragon® 8 Gen 3 Mobile | 0.737 ms | 0 - 84 MB | NPU |
| LeViT | ONNX | w8a16_mixed_int16 | Qualcomm® QCS6490 | 44.528 ms | 11 - 17 MB | CPU |
| LeViT | ONNX | w8a16_mixed_int16 | Qualcomm® QCS8550 (Proxy) | 1.063 ms | 0 - 13 MB | NPU |
| LeViT | ONNX | w8a16_mixed_int16 | Qualcomm® QCS9075 | 1.311 ms | 0 - 3 MB | NPU |
| LeViT | ONNX | w8a16_mixed_int16 | Qualcomm® QCM6690 | 18.63 ms | 25 - 35 MB | CPU |
| LeViT | ONNX | w8a16_mixed_int16 | Snapdragon® 8 Elite For Galaxy Mobile | 0.546 ms | 0 - 59 MB | NPU |
| LeViT | ONNX | w8a16_mixed_int16 | Snapdragon® 7 Gen 4 Mobile | 15.893 ms | 11 - 22 MB | CPU |
| LeViT | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 0.743 ms | 1 - 61 MB | NPU |
| LeViT | QNN_DLC | float | Snapdragon® X2 Elite | 0.999 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.082 ms | 1 - 88 MB | NPU |
| LeViT | QNN_DLC | float | Qualcomm® QCS8275 (Proxy) | 3.843 ms | 1 - 58 MB | NPU |
| LeViT | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 1.593 ms | 1 - 47 MB | NPU |
| LeViT | QNN_DLC | float | Qualcomm® QCS9075 | 1.884 ms | 1 - 3 MB | NPU |
| LeViT | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 2.363 ms | 0 - 81 MB | NPU |
| LeViT | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 0.849 ms | 1 - 59 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 0.633 ms | 0 - 41 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Snapdragon® X2 Elite | 0.851 ms | 0 - 0 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Snapdragon® X Elite | 1.669 ms | 0 - 0 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Snapdragon® 8 Gen 3 Mobile | 1.017 ms | 0 - 61 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Qualcomm® QCS8275 (Proxy) | 2.967 ms | 0 - 40 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Qualcomm® QCS8550 (Proxy) | 1.46 ms | 0 - 3 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Qualcomm® QCS9075 | 1.724 ms | 2 - 4 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Qualcomm® QCM6690 | 5.673 ms | 0 - 164 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 0.748 ms | 0 - 42 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Snapdragon® 7 Gen 4 Mobile | 1.473 ms | 0 - 39 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 8 Elite Gen 5 Mobile | 0.652 ms | 0 - 41 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Snapdragon® X2 Elite | 0.858 ms | 0 - 0 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Snapdragon® X Elite | 1.703 ms | 0 - 0 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 8 Gen 3 Mobile | 1.037 ms | 0 - 66 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Qualcomm® QCS8275 (Proxy) | 3.052 ms | 0 - 40 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Qualcomm® QCS8550 (Proxy) | 1.493 ms | 0 - 12 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Qualcomm® QCS9075 | 1.745 ms | 2 - 4 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Qualcomm® QCM6690 | 6.08 ms | 0 - 166 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 8 Elite For Galaxy Mobile | 0.752 ms | 0 - 37 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 7 Gen 4 Mobile | 1.506 ms | 0 - 39 MB | NPU |
| LeViT | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 0.68 ms | 0 - 72 MB | NPU |
| LeViT | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 1.051 ms | 0 - 90 MB | NPU |
| LeViT | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 4.099 ms | 0 - 65 MB | NPU |
| LeViT | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 1.56 ms | 0 - 2 MB | NPU |
| LeViT | TFLITE | float | Qualcomm® QCS9075 | 1.88 ms | 0 - 19 MB | NPU |
| LeViT | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 2.399 ms | 0 - 83 MB | NPU |
| LeViT | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 0.802 ms | 0 - 72 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.
