Swin-Small: Optimized for Qualcomm Devices
SwinSmall is a machine learning model that can classify images from the Imagenet dataset. It can also be used as a backbone in building more complex models for specific use cases.
This is based on the implementation of Swin-Small 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 |
| QNN_DLC | float | Universal | QAIRT 2.45 | Download |
| QNN_DLC | w8a16 | Universal | QAIRT 2.45 | Download |
| TFLITE | float | Universal | QAIRT 2.45 | Download |
For more device-specific assets and performance metrics, visit Swin-Small 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 Swin-Small on GitHub for usage instructions.
Model Details
Model Type: Model_use_case.image_classification
Model Stats:
- Model checkpoint: Imagenet
- Input resolution: 224x224
- Number of parameters: 50.4M
- Model size (float): 193 MB
- Model size (w8a16): 52.5 MB
Performance Summary
| Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit |
|---|---|---|---|---|---|---|
| Swin-Small | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 6.318 ms | 1 - 647 MB | NPU |
| Swin-Small | ONNX | float | Snapdragon® 8 Elite Mobile | 7.658 ms | 1 - 645 MB | NPU |
| Swin-Small | ONNX | float | Snapdragon® X2 Elite | 6.719 ms | 101 - 101 MB | NPU |
| Swin-Small | ONNX | float | Snapdragon® X Elite | 15.881 ms | 100 - 100 MB | NPU |
| Swin-Small | ONNX | float | Snapdragon® X Elite | 15.881 ms | 100 - 100 MB | NPU |
| Swin-Small | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 9.989 ms | 0 - 519 MB | NPU |
| Swin-Small | ONNX | float | Qualcomm® QCS8550 (Proxy) | 15.343 ms | 1 - 7 MB | NPU |
| Swin-Small | ONNX | float | Qualcomm® QCS9075 | 19.924 ms | 0 - 4 MB | NPU |
| Swin-Small | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 7.658 ms | 1 - 645 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 5.887 ms | 0 - 382 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® 8 Elite Mobile | 7.337 ms | 0 - 458 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® X2 Elite | 6.325 ms | 54 - 54 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® X Elite | 14.567 ms | 53 - 53 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® X Elite | 14.567 ms | 53 - 53 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 9.211 ms | 0 - 528 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® QCS6490 | 721.617 ms | 94 - 109 MB | CPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® QCS8550 (Proxy) | 13.958 ms | 0 - 62 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® QCS9075 | 16.989 ms | 0 - 3 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® QCM6690 | 379.333 ms | 75 - 94 MB | CPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 7.337 ms | 0 - 458 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 355.219 ms | 92 - 113 MB | CPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 355.219 ms | 92 - 113 MB | CPU |
| Swin-Small | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 6.215 ms | 1 - 597 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® 8 Elite Mobile | 7.594 ms | 1 - 587 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® X2 Elite | 6.995 ms | 1 - 1 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® X Elite | 16.25 ms | 1 - 1 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® X Elite | 16.25 ms | 1 - 1 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 9.901 ms | 0 - 407 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® QCS8275 (Proxy) | 37.927 ms | 1 - 275 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 15.348 ms | 1 - 16 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® SA8775P | 17.375 ms | 1 - 592 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® SA8775P | 17.375 ms | 1 - 592 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® SA8775P | 17.375 ms | 1 - 592 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® QCS9075 | 19.447 ms | 1 - 3 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 23.957 ms | 0 - 397 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® SA7255P | 37.927 ms | 1 - 275 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® SA8295P | 22.613 ms | 1 - 269 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 7.594 ms | 1 - 587 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 6.384 ms | 0 - 635 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® 8 Elite Mobile | 8.047 ms | 0 - 622 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® X2 Elite | 7.168 ms | 0 - 0 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® X Elite | 17.272 ms | 0 - 0 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® X Elite | 17.272 ms | 0 - 0 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® 8 Gen 3 Mobile | 10.729 ms | 0 - 864 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® QCS8275 (Proxy) | 29.077 ms | 0 - 634 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® QCS8550 (Proxy) | 16.261 ms | 0 - 3 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® SA8775P | 16.636 ms | 0 - 638 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® SA8775P | 16.636 ms | 0 - 638 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® SA8775P | 16.636 ms | 0 - 638 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® QCS9075 | 18.784 ms | 0 - 2 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® QCM6690 | 65.314 ms | 0 - 617 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® SA7255P | 29.077 ms | 0 - 634 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 8.047 ms | 0 - 622 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® 7 Gen 4 Mobile | 16.993 ms | 0 - 654 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® 7 Gen 4 Mobile | 16.993 ms | 0 - 654 MB | NPU |
| Swin-Small | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 6.528 ms | 0 - 310 MB | NPU |
| Swin-Small | TFLITE | float | Snapdragon® 8 Elite Mobile | 7.798 ms | 0 - 284 MB | NPU |
| Swin-Small | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 10.168 ms | 0 - 436 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 37.447 ms | 0 - 301 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 15.622 ms | 0 - 4 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® SA8775P | 17.463 ms | 0 - 305 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® SA8775P | 17.463 ms | 0 - 305 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® SA8775P | 17.463 ms | 0 - 305 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® QCS9075 | 19.903 ms | 0 - 104 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 23.5 ms | 0 - 410 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® SA7255P | 37.447 ms | 0 - 301 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® SA8295P | 22.961 ms | 0 - 296 MB | NPU |
| Swin-Small | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 7.798 ms | 0 - 284 MB | NPU |
License
- The license for the original implementation of Swin-Small 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.
