--- library_name: pytorch license: other tags: - android pipeline_tag: image-classification --- ![](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/sequencer2d/web-assets/model_demo.png) # Sequencer2D: Optimized for Qualcomm Devices Sequencer2D is a vision transformer model that can classify images from the Imagenet dataset. This is based on the implementation of Sequencer2D found [here](https://github.com/okojoalg/sequencer). This repository contains pre-exported model files optimized for Qualcomm® devices. You can use the [Qualcomm® AI Hub Models](https://github.com/qualcomm/ai-hub-models/blob/main/src/qai_hub_models/models/sequencer2d) library to export with custom configurations. More details on model performance across various devices, can be found [here](#performance-summary). Qualcomm AI Hub Models uses [Qualcomm AI Hub Workbench](https://workbench.aihub.qualcomm.com) to compile, profile, and evaluate this model. [Sign up](https://myaccount.qualcomm.com/signup) 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](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/sequencer2d/releases/v0.51.0/sequencer2d-onnx-float.zip) | ONNX | w8a16 | Universal | QAIRT 2.42, ONNX Runtime 1.24.3 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/sequencer2d/releases/v0.51.0/sequencer2d-onnx-w8a16.zip) | QNN_DLC | float | Universal | QAIRT 2.45 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/sequencer2d/releases/v0.51.0/sequencer2d-qnn_dlc-float.zip) | TFLITE | float | Universal | QAIRT 2.45 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/sequencer2d/releases/v0.51.0/sequencer2d-tflite-float.zip) For more device-specific assets and performance metrics, visit **[Sequencer2D on Qualcomm® AI Hub](https://aihub.qualcomm.com/models/sequencer2d)**. ### Option 2: Export with Custom Configurations Use the [Qualcomm® AI Hub Models](https://github.com/qualcomm/ai-hub-models/blob/main/src/qai_hub_models/models/sequencer2d) 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 [Sequencer2D on GitHub](https://github.com/qualcomm/ai-hub-models/blob/main/src/qai_hub_models/models/sequencer2d) for usage instructions. ## Model Details **Model Type:** Model_use_case.image_classification **Model Stats:** - Model checkpoint: sequencer2d_s - Input resolution: 224x224 - Number of parameters: 27.6M - Model size (float): 106 MB - Model size (w8a8): 69.1 MB ## Performance Summary | Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit |---|---|---|---|---|---|--- | Sequencer2D | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 7.882 ms | 0 - 1367 MB | NPU | Sequencer2D | ONNX | float | Snapdragon® X2 Elite | 9.777 ms | 61 - 61 MB | NPU | Sequencer2D | ONNX | float | Snapdragon® X Elite | 16.97 ms | 59 - 59 MB | NPU | Sequencer2D | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 11.274 ms | 1 - 2286 MB | NPU | Sequencer2D | ONNX | float | Qualcomm® QCS8550 (Proxy) | 16.727 ms | 0 - 82 MB | NPU | Sequencer2D | ONNX | float | Qualcomm® QCS9075 | 19.6 ms | 0 - 4 MB | NPU | Sequencer2D | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 9.831 ms | 1 - 1046 MB | NPU | Sequencer2D | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 8.08 ms | 0 - 730 MB | NPU | Sequencer2D | ONNX | w8a16 | Snapdragon® X2 Elite | 9.939 ms | 45 - 45 MB | NPU | Sequencer2D | ONNX | w8a16 | Snapdragon® X Elite | 18.164 ms | 43 - 43 MB | NPU | Sequencer2D | ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 11.437 ms | 0 - 869 MB | NPU | Sequencer2D | ONNX | w8a16 | Qualcomm® QCS6490 | 612.837 ms | 46 - 52 MB | CPU | Sequencer2D | ONNX | w8a16 | Qualcomm® QCS8550 (Proxy) | 17.491 ms | 0 - 71 MB | NPU | Sequencer2D | ONNX | w8a16 | Qualcomm® QCS9075 | 20.543 ms | 0 - 3 MB | NPU | Sequencer2D | ONNX | w8a16 | Qualcomm® QCM6690 | 310.143 ms | 47 - 63 MB | CPU | Sequencer2D | ONNX | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 10.125 ms | 0 - 705 MB | NPU | Sequencer2D | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 298.712 ms | 47 - 65 MB | CPU | Sequencer2D | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 9.208 ms | 0 - 855 MB | NPU | Sequencer2D | QNN_DLC | float | Snapdragon® X2 Elite | 14.418 ms | 1 - 1 MB | NPU | Sequencer2D | QNN_DLC | float | Snapdragon® X Elite | 21.702 ms | 1 - 1 MB | NPU | Sequencer2D | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 14.436 ms | 0 - 2148 MB | NPU | Sequencer2D | QNN_DLC | float | Qualcomm® QCS8275 (Proxy) | 52.203 ms | 1 - 973 MB | NPU | Sequencer2D | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 20.907 ms | 1 - 424 MB | NPU | Sequencer2D | QNN_DLC | float | Qualcomm® QCS9075 | 23.027 ms | 1 - 3 MB | NPU | Sequencer2D | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 26.331 ms | 0 - 797 MB | NPU | Sequencer2D | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 12.196 ms | 1 - 1047 MB | NPU | Sequencer2D | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 7.192 ms | 0 - 756 MB | NPU | Sequencer2D | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 11.925 ms | 0 - 981 MB | NPU | Sequencer2D | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 37.327 ms | 0 - 796 MB | NPU | Sequencer2D | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 17.45 ms | 0 - 18 MB | NPU | Sequencer2D | TFLITE | float | Qualcomm® QCS9075 | 20.36 ms | 0 - 75 MB | NPU | Sequencer2D | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 21.317 ms | 0 - 726 MB | NPU | Sequencer2D | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 9.395 ms | 0 - 784 MB | NPU ## License * The license for the original implementation of Sequencer2D can be found [here](https://github.com/okojoalg/sequencer/blob/main/LICENSE). ## References * [Sequencer: Deep LSTM for Image Classification](https://arxiv.org/abs/2205.01972) * [Source Model Implementation](https://github.com/okojoalg/sequencer) ## Community * Join [our AI Hub Slack community](https://aihub.qualcomm.com/community/slack) to collaborate, post questions and learn more about on-device AI. * For questions or feedback please [reach out to us](mailto:ai-hub-support@qti.qualcomm.com).