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 | 7.215 ms | 1 - 406 MB | NPU |
| Swin-Small | ONNX | float | Snapdragon® X2 Elite | 8.033 ms | 109 - 109 MB | NPU |
| Swin-Small | ONNX | float | Snapdragon® X Elite | 19.461 ms | 108 - 108 MB | NPU |
| Swin-Small | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 12.427 ms | 0 - 527 MB | NPU |
| Swin-Small | ONNX | float | Qualcomm® QCS8550 (Proxy) | 18.509 ms | 0 - 123 MB | NPU |
| Swin-Small | ONNX | float | Qualcomm® QCS9075 | 22.286 ms | 0 - 4 MB | NPU |
| Swin-Small | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 8.952 ms | 1 - 361 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 5.998 ms | 0 - 400 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® X2 Elite | 6.446 ms | 59 - 59 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® X Elite | 14.759 ms | 64 - 64 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 9.412 ms | 0 - 573 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® QCS6490 | 801.98 ms | 99 - 113 MB | CPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® QCS8550 (Proxy) | 14.084 ms | 0 - 7 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® QCS9075 | 18.095 ms | 0 - 3 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® QCM6690 | 385.253 ms | 81 - 99 MB | CPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 7.502 ms | 0 - 474 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 360.716 ms | 107 - 128 MB | CPU |
| Swin-Small | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 6.47 ms | 0 - 606 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® X2 Elite | 7.232 ms | 1 - 1 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® X Elite | 16.783 ms | 1 - 1 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 10.518 ms | 0 - 976 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® QCS8275 (Proxy) | 39.187 ms | 1 - 631 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 16.15 ms | 1 - 387 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® SA8775P | 18.046 ms | 1 - 626 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® QCS9075 | 20.327 ms | 1 - 3 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 25.298 ms | 0 - 409 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® SA7255P | 39.187 ms | 1 - 631 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® SA8295P | 23.36 ms | 1 - 599 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 7.956 ms | 1 - 621 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 6.495 ms | 0 - 655 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® X2 Elite | 7.364 ms | 0 - 0 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® X Elite | 17.596 ms | 0 - 0 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® 8 Gen 3 Mobile | 10.856 ms | 0 - 883 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® QCS8275 (Proxy) | 29.028 ms | 0 - 651 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® QCS8550 (Proxy) | 16.51 ms | 0 - 3 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® SA8775P | 16.767 ms | 0 - 656 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® QCS9075 | 19.739 ms | 0 - 2 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® QCM6690 | 78.03 ms | 0 - 619 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® SA7255P | 29.028 ms | 0 - 651 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 8.302 ms | 0 - 642 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® 7 Gen 4 Mobile | 17.296 ms | 0 - 685 MB | NPU |
| Swin-Small | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 7.102 ms | 0 - 320 MB | NPU |
| Swin-Small | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 11.638 ms | 0 - 449 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 41.087 ms | 0 - 317 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 17.623 ms | 0 - 4 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® SA8775P | 19.653 ms | 0 - 316 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® QCS9075 | 22.581 ms | 0 - 104 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 25.957 ms | 0 - 428 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® SA7255P | 41.087 ms | 0 - 317 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® SA8295P | 25.431 ms | 0 - 310 MB | NPU |
| Swin-Small | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 8.893 ms | 0 - 309 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.
