--- 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/quic/ai-hub-models/blob/main/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.37, ONNX Runtime 1.23.0 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/sequencer2d/releases/v0.46.0/sequencer2d-onnx-float.zip) | ONNX | w8a16 | Universal | QAIRT 2.37, ONNX Runtime 1.23.0 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/sequencer2d/releases/v0.46.0/sequencer2d-onnx-w8a16.zip) | QNN_DLC | float | Universal | QAIRT 2.42 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/sequencer2d/releases/v0.46.0/sequencer2d-qnn_dlc-float.zip) | TFLITE | float | Universal | QAIRT 2.42, TFLite 2.17.0 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/sequencer2d/releases/v0.46.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/quic/ai-hub-models/blob/main/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/quic/ai-hub-models/blob/main/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® X Elite | 48.401 ms | 66 - 66 MB | NPU | Sequencer2D | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 33.466 ms | 1 - 1349 MB | NPU | Sequencer2D | ONNX | float | Qualcomm® QCS8550 (Proxy) | 46.558 ms | 0 - 83 MB | NPU | Sequencer2D | ONNX | float | Qualcomm® QCS9075 | 57.399 ms | 0 - 4 MB | NPU | Sequencer2D | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 23.058 ms | 1 - 766 MB | NPU | Sequencer2D | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 17.991 ms | 1 - 807 MB | NPU | Sequencer2D | ONNX | w8a16 | Snapdragon® X Elite | 123.498 ms | 132 - 132 MB | NPU | Sequencer2D | ONNX | w8a16 | Qualcomm® QCS6490 | 647.033 ms | 46 - 56 MB | CPU | Sequencer2D | ONNX | w8a16 | Qualcomm® QCS9075 | 165.125 ms | 107 - 110 MB | NPU | Sequencer2D | ONNX | w8a16 | Qualcomm® QCM6690 | 274.09 ms | 47 - 63 MB | CPU | Sequencer2D | ONNX | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 105.431 ms | 106 - 488 MB | NPU | Sequencer2D | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 260.838 ms | 26 - 37 MB | CPU | Sequencer2D | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 102.361 ms | 50 - 436 MB | NPU | Sequencer2D | QNN_DLC | float | Snapdragon® X Elite | 21.419 ms | 1 - 1 MB | NPU | Sequencer2D | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 14.292 ms | 0 - 2279 MB | NPU | Sequencer2D | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 20.806 ms | 1 - 565 MB | NPU | Sequencer2D | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 26.272 ms | 0 - 846 MB | NPU | Sequencer2D | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 12.521 ms | 1 - 1065 MB | NPU | Sequencer2D | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 9.34 ms | 0 - 1225 MB | NPU | Sequencer2D | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 11.933 ms | 0 - 917 MB | NPU | Sequencer2D | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 37.369 ms | 0 - 810 MB | NPU | Sequencer2D | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 17.044 ms | 0 - 12 MB | NPU | Sequencer2D | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 21.299 ms | 0 - 724 MB | NPU | Sequencer2D | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 9.406 ms | 0 - 744 MB | NPU | Sequencer2D | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 7.34 ms | 0 - 1082 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).