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.25.0 | Download |
| ONNX | w8a16 | Universal | QAIRT 2.42, ONNX Runtime 1.25.0 | 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.327 ms | 1 - 636 MB | NPU |
| Swin-Small | ONNX | float | Snapdragon® X2 Elite | 6.806 ms | 211 - 211 MB | NPU |
| Swin-Small | ONNX | float | Snapdragon® X Elite | 15.983 ms | 148 - 148 MB | NPU |
| Swin-Small | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 10.165 ms | 1 - 1029 MB | NPU |
| Swin-Small | ONNX | float | Qualcomm® QCS8550 (Proxy) | 15.302 ms | 0 - 123 MB | NPU |
| Swin-Small | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 7.676 ms | 1 - 625 MB | NPU |
| Swin-Small | ONNX | float | Qualcomm® QCS9075 | 19.672 ms | 1 - 46 MB | NPU |
| Swin-Small | ONNX | float | Qualcomm® QCS8750 | 7.676 ms | 1 - 625 MB | NPU |
| Swin-Small | ONNX | float | Qualcomm® QCS7181 | 15.983 ms | 148 - 148 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 5.884 ms | 0 - 377 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® X2 Elite | 6.326 ms | 212 - 212 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® X Elite | 14.42 ms | 181 - 181 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 9.24 ms | 3 - 545 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® QCS6490 | 761.587 ms | 98 - 111 MB | CPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® QCS8550 (Proxy) | 13.91 ms | 0 - 71 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® QCM6690 | 371.408 ms | 76 - 95 MB | CPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 349.419 ms | 91 - 112 MB | CPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 7.286 ms | 0 - 448 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® QCS9075 | 16.996 ms | 0 - 45 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® QCS7790 | 349.419 ms | 91 - 112 MB | CPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® QCS8750 | 7.286 ms | 0 - 448 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® QCS7181 | 14.42 ms | 181 - 181 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 6.219 ms | 1 - 596 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® X2 Elite | 7.071 ms | 1 - 1 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® X Elite | 16.362 ms | 1 - 1 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 9.927 ms | 0 - 404 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® QCS8275 | 37.906 ms | 1 - 276 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 15.337 ms | 1 - 299 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® SA8775P | 17.396 ms | 1 - 593 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® SA8650P | 17.396 ms | 1 - 593 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® SA8255P | 17.396 ms | 1 - 593 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 23.99 ms | 0 - 397 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® SA7255P | 37.906 ms | 1 - 276 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® SA8295P | 22.637 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 | float | Qualcomm® QCS9075 | 19.704 ms | 1 - 3 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® QCS8750 | 7.594 ms | 1 - 587 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® QCS7181 | 16.362 ms | 1 - 1 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 6.427 ms | 0 - 635 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® X2 Elite | 7.176 ms | 0 - 0 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® X Elite | 17.26 ms | 0 - 0 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® 8 Gen 3 Mobile | 10.768 ms | 0 - 865 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® QCS8275 | 29.078 ms | 0 - 635 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® QCS8550 (Proxy) | 16.212 ms | 0 - 2 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® SA8775P | 16.714 ms | 0 - 639 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® SA8650P | 16.714 ms | 0 - 639 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® SA8255P | 16.714 ms | 0 - 639 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® QCM6690 | 70.847 ms | 0 - 626 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® SA7255P | 29.078 ms | 0 - 635 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® 7 Gen 4 Mobile | 16.99 ms | 0 - 655 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 8.115 ms | 0 - 623 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® QCS9075 | 18.94 ms | 0 - 2 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® QCS7790 | 16.99 ms | 0 - 655 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® QCS8750 | 8.115 ms | 0 - 623 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® QCS7181 | 17.26 ms | 0 - 0 MB | NPU |
| Swin-Small | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 6.549 ms | 0 - 320 MB | NPU |
| Swin-Small | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 10.147 ms | 0 - 435 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® QCS8275 | 37.41 ms | 0 - 306 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 15.478 ms | 0 - 4 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® SA8775P | 17.462 ms | 0 - 305 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® SA8650P | 17.462 ms | 0 - 305 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® SA8255P | 17.462 ms | 0 - 305 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 23.411 ms | 0 - 411 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® SA7255P | 37.41 ms | 0 - 306 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® SA8295P | 22.965 ms | 0 - 297 MB | NPU |
| Swin-Small | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 7.824 ms | 0 - 304 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® QCS9075 | 20.027 ms | 0 - 104 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® QCS8750 | 7.824 ms | 0 - 304 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.
