
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.51, ONNX Runtime 1.30.0 | Download |
| ONNX | w8a16 | Universal | QAIRT 2.51, ONNX Runtime 1.30.0 | Download |
| QNN_DLC | float | Universal | QAIRT 2.51 | Download |
| QNN_DLC | w8a16 | Universal | QAIRT 2.51 | Download |
| TFLITE | float | Universal | QAIRT 2.51 | 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:
- Input resolution: 224x224
- Model checkpoint: Imagenet
- Model size (float): 193 MB
- Model size (w8a16): 52.5 MB
- Number of parameters: 50.4M
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 For Galaxy Mobile | 6.057 ms | 0 - 300 MB | NPU |
| Swin-Small | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 7.289 ms | 1 - 288 MB | NPU |
| Swin-Small | ONNX | float | Snapdragon® X2 Elite | 6.326 ms | 2 - 2 MB | NPU |
| Swin-Small | ONNX | float | Snapdragon® X Elite | 14.991 ms | 101 - 101 MB | NPU |
| Swin-Small | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 10.146 ms | 0 - 419 MB | NPU |
| Swin-Small | ONNX | float | Snapdragon® 8 Gen 1 Mobile | 22.586 ms | 0 - 411 MB | NPU |
| Swin-Small | ONNX | float | Qualcomm® Dragonwing™ IQ-8275 | 15.049 ms | 1 - 5 MB | NPU |
| Swin-Small | ONNX | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 14.427 ms | 0 - 114 MB | NPU |
| Swin-Small | ONNX | float | Qualcomm® QCS8450 | 22.586 ms | 0 - 411 MB | NPU |
| Swin-Small | ONNX | float | Qualcomm® Dragonwing™ IQ-9075 | 17.138 ms | 0 - 4 MB | NPU |
| Swin-Small | ONNX | float | Qualcomm® Dragonwing™ IQ-X7181 | 14.991 ms | 101 - 101 MB | NPU |
| Swin-Small | ONNX | float | Qualcomm® Dragonwing™ Q-8750 | 7.289 ms | 1 - 288 MB | NPU |
| Swin-Small | ONNX | float | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 5.335 ms | 1 - 291 MB | NPU |
| Swin-Small | ONNX | float | Snapdragon® 8 Elite Gen 6 Mobile | 6.824 ms | 1 - 290 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 5.065 ms | 0 - 344 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 6.343 ms | 0 - 331 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® X2 Elite | 5.241 ms | 1 - 1 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® X Elite | 13.118 ms | 53 - 53 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 8.952 ms | 0 - 443 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® 8 Gen 1 Mobile | 15.793 ms | 0 - 445 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® Dragonwing™ QCS6490 | 27.838 ms | 1 - 4 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-8275 | 11.26 ms | 1 - 5 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 12.616 ms | 0 - 59 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® QCS8450 | 15.793 ms | 0 - 445 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 13.51 ms | 1 - 5 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 13.118 ms | 53 - 53 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-6690 | 65.763 ms | 0 - 538 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-7790 | 13.635 ms | 0 - 380 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 6.343 ms | 0 - 331 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 13.635 ms | 0 - 380 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 4.217 ms | 0 - 341 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® 8 Elite Gen 6 Mobile | 5.676 ms | 0 - 338 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 5.75 ms | 0 - 284 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 7.03 ms | 0 - 271 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® X2 Elite | 6.46 ms | 1 - 1 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® X Elite | 14.764 ms | 1 - 1 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 9.9 ms | 0 - 404 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® 8 Gen 1 Mobile | 22.481 ms | 0 - 393 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-8275 | 14.82 ms | 0 - 3 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 14.051 ms | 0 - 375 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® QCS8450 | 22.481 ms | 0 - 393 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-9075 | 16.211 ms | 0 - 2 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-X7181 | 14.764 ms | 1 - 1 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® Dragonwing™ Q-8750 | 7.03 ms | 0 - 271 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® SA8295P | 20.95 ms | 0 - 263 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 5.001 ms | 0 - 275 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® 8 Elite Gen 6 Mobile | 6.558 ms | 0 - 267 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 5.725 ms | 0 - 312 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 7.411 ms | 0 - 310 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® X2 Elite | 6.295 ms | 0 - 0 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® X Elite | 15.936 ms | 0 - 0 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® 8 Gen 3 Mobile | 10.807 ms | 0 - 409 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-8275 | 14.016 ms | 1 - 4 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 15.002 ms | 0 - 3 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® SA8650P | 15.453 ms | 0 - 328 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® SA8255P | 15.453 ms | 0 - 328 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 15.898 ms | 3 - 5 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 15.936 ms | 0 - 0 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-6690 | 68.747 ms | 0 - 511 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-7790 | 16.0 ms | 0 - 353 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 7.411 ms | 0 - 310 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® 7 Gen 4 Mobile | 16.0 ms | 0 - 353 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 5.691 ms | 0 - 310 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 6 Mobile | 7.793 ms | 0 - 308 MB | NPU |
| Swin-Small | TFLITE | float | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 6.149 ms | 0 - 314 MB | NPU |
| Swin-Small | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 7.268 ms | 24 - 315 MB | NPU |
| Swin-Small | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 10.19 ms | 0 - 420 MB | NPU |
| Swin-Small | TFLITE | float | Snapdragon® 8 Gen 1 Mobile | 22.201 ms | 0 - 412 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® Dragonwing™ IQ-8275 | 14.541 ms | 0 - 105 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 14.155 ms | 0 - 4 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® SA8775P | 75.419 ms | 1 - 33 MB | GPU |
| Swin-Small | TFLITE | float | Qualcomm® SA8650P | 75.419 ms | 1 - 33 MB | GPU |
| Swin-Small | TFLITE | float | Qualcomm® SA8255P | 75.419 ms | 1 - 33 MB | GPU |
| Swin-Small | TFLITE | float | Qualcomm® QCS8450 | 22.201 ms | 0 - 412 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® Dragonwing™ IQ-9075 | 16.38 ms | 0 - 104 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® Dragonwing™ Q-8750 | 7.268 ms | 24 - 315 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® SA8295P | 21.244 ms | 0 - 286 MB | NPU |
| Swin-Small | TFLITE | float | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 5.419 ms | 0 - 299 MB | NPU |
| Swin-Small | TFLITE | float | Snapdragon® 8 Elite Gen 6 Mobile | 6.772 ms | 0 - 294 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.