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.3 | Download |
| ONNX | w8a16 | Universal | QAIRT 2.42, ONNX Runtime 1.24.3 | Download |
| ONNX | w8a16_mixed_int16 | Universal | QAIRT 2.42, ONNX Runtime 1.24.3 | 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® 8 Elite Gen 5 Mobile | 0.653 ms | 1 - 76 MB | NPU |
| LeViT | ONNX | float | Snapdragon® X2 Elite | 0.71 ms | 16 - 16 MB | NPU |
| LeViT | ONNX | float | Snapdragon® X Elite | 1.479 ms | 16 - 16 MB | NPU |
| LeViT | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 0.864 ms | 0 - 93 MB | NPU |
| LeViT | ONNX | float | Qualcomm® QCS8550 (Proxy) | 1.254 ms | 0 - 22 MB | NPU |
| LeViT | ONNX | float | Qualcomm® QCS9075 | 1.617 ms | 1 - 3 MB | NPU |
| LeViT | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 0.706 ms | 0 - 67 MB | NPU |
| LeViT | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 0.467 ms | 0 - 62 MB | NPU |
| LeViT | ONNX | w8a16 | Snapdragon® X2 Elite | 0.507 ms | 8 - 8 MB | NPU |
| LeViT | ONNX | w8a16 | Snapdragon® X Elite | 1.253 ms | 8 - 8 MB | NPU |
| LeViT | ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 0.719 ms | 0 - 80 MB | NPU |
| LeViT | ONNX | w8a16 | Qualcomm® QCS6490 | 43.779 ms | 11 - 16 MB | CPU |
| LeViT | ONNX | w8a16 | Qualcomm® QCS8550 (Proxy) | 1.054 ms | 0 - 13 MB | NPU |
| LeViT | ONNX | w8a16 | Qualcomm® QCS9075 | 1.275 ms | 0 - 3 MB | NPU |
| LeViT | ONNX | w8a16 | Qualcomm® QCM6690 | 18.551 ms | 11 - 21 MB | CPU |
| LeViT | ONNX | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 0.529 ms | 0 - 60 MB | NPU |
| LeViT | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 16.116 ms | 19 - 29 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.506 ms | 10 - 10 MB | NPU |
| LeViT | ONNX | w8a16_mixed_int16 | Snapdragon® X Elite | 1.28 ms | 10 - 10 MB | NPU |
| LeViT | ONNX | w8a16_mixed_int16 | Snapdragon® 8 Gen 3 Mobile | 0.738 ms | 0 - 87 MB | NPU |
| LeViT | ONNX | w8a16_mixed_int16 | Qualcomm® QCS6490 | 43.894 ms | 15 - 20 MB | CPU |
| LeViT | ONNX | w8a16_mixed_int16 | Qualcomm® QCS8550 (Proxy) | 1.062 ms | 0 - 110 MB | NPU |
| LeViT | ONNX | w8a16_mixed_int16 | Qualcomm® QCS9075 | 1.312 ms | 0 - 3 MB | NPU |
| LeViT | ONNX | w8a16_mixed_int16 | Qualcomm® QCM6690 | 18.563 ms | 12 - 23 MB | CPU |
| LeViT | ONNX | w8a16_mixed_int16 | Snapdragon® 8 Elite For Galaxy Mobile | 0.549 ms | 0 - 59 MB | NPU |
| LeViT | ONNX | w8a16_mixed_int16 | Snapdragon® 7 Gen 4 Mobile | 15.119 ms | 19 - 28 MB | CPU |
| LeViT | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 0.73 ms | 1 - 59 MB | NPU |
| LeViT | QNN_DLC | float | Snapdragon® X2 Elite | 0.978 ms | 1 - 1 MB | NPU |
| LeViT | QNN_DLC | float | Snapdragon® X Elite | 1.791 ms | 1 - 1 MB | NPU |
| LeViT | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 1.064 ms | 0 - 79 MB | NPU |
| LeViT | QNN_DLC | float | Qualcomm® QCS8275 (Proxy) | 3.814 ms | 1 - 55 MB | NPU |
| LeViT | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 1.565 ms | 1 - 2 MB | NPU |
| LeViT | QNN_DLC | float | Qualcomm® QCS9075 | 1.863 ms | 1 - 3 MB | NPU |
| LeViT | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 2.351 ms | 0 - 77 MB | NPU |
| LeViT | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 0.836 ms | 0 - 61 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 0.634 ms | 0 - 44 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Snapdragon® X2 Elite | 0.851 ms | 0 - 0 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 | 0.991 ms | 0 - 60 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Qualcomm® QCS8275 (Proxy) | 2.955 ms | 0 - 39 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Qualcomm® QCS8550 (Proxy) | 1.419 ms | 0 - 2 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Qualcomm® QCS9075 | 1.711 ms | 0 - 2 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Qualcomm® QCM6690 | 5.769 ms | 0 - 165 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 0.721 ms | 0 - 42 MB | NPU |
| LeViT | QNN_DLC | w8a16 | Snapdragon® 7 Gen 4 Mobile | 1.469 ms | 0 - 39 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 8 Elite Gen 5 Mobile | 0.654 ms | 0 - 44 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Snapdragon® X2 Elite | 0.848 ms | 0 - 0 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Snapdragon® X Elite | 1.638 ms | 0 - 0 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 8 Gen 3 Mobile | 1.01 ms | 0 - 60 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Qualcomm® QCS8275 (Proxy) | 2.979 ms | 0 - 38 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Qualcomm® QCS8550 (Proxy) | 1.439 ms | 0 - 38 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Qualcomm® QCS9075 | 1.723 ms | 0 - 2 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Qualcomm® QCM6690 | 6.127 ms | 0 - 164 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 8 Elite For Galaxy Mobile | 0.736 ms | 0 - 37 MB | NPU |
| LeViT | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 7 Gen 4 Mobile | 1.48 ms | 0 - 39 MB | NPU |
| LeViT | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 0.659 ms | 0 - 68 MB | NPU |
| LeViT | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 1.038 ms | 0 - 91 MB | NPU |
| LeViT | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 4.012 ms | 0 - 62 MB | NPU |
| LeViT | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 1.516 ms | 0 - 2 MB | NPU |
| LeViT | TFLITE | float | Qualcomm® QCS9075 | 1.875 ms | 0 - 19 MB | NPU |
| LeViT | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 2.378 ms | 0 - 79 MB | NPU |
| LeViT | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 0.785 ms | 0 - 61 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.
