qaihm-bot commited on
Commit
e18760c
·
verified ·
1 Parent(s): 822797a

See https://github.com/quic/ai-hub-models/releases/v0.46.1 for changelog.

LeViT_float.dlc DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:5dd7c574a06f8631ce2cbb356826ed4c3551798cd58f2db26d0b72f42d9e523c
3
- size 31512100
 
 
 
 
LeViT_float.onnx.zip DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:4c548eec1b7257f6a65102d0a3e6729d26d72abd56443302534e51649c371660
3
- size 27620887
 
 
 
 
LeViT_float.tflite DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:9b31cefe563490abf2d4152e6871996b87c5c0625cb2a2f9a08885a1bb4c3e4d
3
- size 31342336
 
 
 
 
LeViT_w8a16.dlc DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:d0f06660ae0c3ba622521dcfa8d475cd9fd385cd405cc7b028fa8fb80c956efc
3
- size 8611180
 
 
 
 
LeViT_w8a16_mixed_int16.dlc DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:6e1af92e7ac0ce49e406037104db31d0654fd16fcd03fb377c63def0c2edfd27
3
- size 9926508
 
 
 
 
README.md CHANGED
@@ -10,258 +10,108 @@ pipeline_tag: image-classification
10
 
11
  ![](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/levit/web-assets/model_demo.png)
12
 
13
- # LeViT: Optimized for Mobile Deployment
14
- ## Imagenet classifier and general purpose backbone
15
-
16
 
17
  LeViT is a vision transformer model that can classify images from the Imagenet dataset.
18
 
19
- This model is an implementation of LeViT found [here](https://github.com/facebookresearch/LeViT).
20
-
21
-
22
- This repository provides scripts to run LeViT on Qualcomm® devices.
23
- More details on model performance across various devices, can be found
24
- [here](https://aihub.qualcomm.com/models/levit).
25
-
26
-
27
-
28
- ### Model Details
29
-
30
- - **Model Type:** Model_use_case.image_classification
31
- - **Model Stats:**
32
- - Model checkpoint: LeViT-128S
33
- - Input resolution: 224x224
34
- - Number of parameters: 7.82M
35
- - Model size (float): 29.9 MB
36
- - Model size (w8a16): 8.83 MB
37
-
38
- | Model | Precision | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit | Target Model
39
- |---|---|---|---|---|---|---|---|---|
40
- | LeViT | float | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | TFLITE | 3.915 ms | 0 - 150 MB | NPU | [LeViT.tflite](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT.tflite) |
41
- | LeViT | float | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | QNN_DLC | 3.743 ms | 1 - 147 MB | NPU | [LeViT.dlc](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT.dlc) |
42
- | LeViT | float | QCS8450 (Proxy) | Qualcomm® QCS8450 (Proxy) | TFLITE | 2.187 ms | 0 - 177 MB | NPU | [LeViT.tflite](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT.tflite) |
43
- | LeViT | float | QCS8450 (Proxy) | Qualcomm® QCS8450 (Proxy) | QNN_DLC | 2.174 ms | 1 - 178 MB | NPU | [LeViT.dlc](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT.dlc) |
44
- | LeViT | float | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | TFLITE | 1.446 ms | 0 - 3 MB | NPU | [LeViT.tflite](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT.tflite) |
45
- | LeViT | float | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | QNN_DLC | 1.479 ms | 1 - 3 MB | NPU | [LeViT.dlc](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT.dlc) |
46
- | LeViT | float | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | ONNX | 1.498 ms | 0 - 22 MB | NPU | [LeViT.onnx.zip](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT.onnx.zip) |
47
- | LeViT | float | QCS9075 (Proxy) | Qualcomm® QCS9075 (Proxy) | TFLITE | 1.945 ms | 0 - 150 MB | NPU | [LeViT.tflite](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT.tflite) |
48
- | LeViT | float | QCS9075 (Proxy) | Qualcomm® QCS9075 (Proxy) | QNN_DLC | 1.931 ms | 0 - 148 MB | NPU | [LeViT.dlc](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT.dlc) |
49
- | LeViT | float | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | TFLITE | 0.987 ms | 0 - 184 MB | NPU | [LeViT.tflite](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT.tflite) |
50
- | LeViT | float | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | QNN_DLC | 1.032 ms | 1 - 178 MB | NPU | [LeViT.dlc](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT.dlc) |
51
- | LeViT | float | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | ONNX | 0.995 ms | 0 - 153 MB | NPU | [LeViT.onnx.zip](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT.onnx.zip) |
52
- | LeViT | float | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | TFLITE | 0.773 ms | 0 - 150 MB | NPU | [LeViT.tflite](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT.tflite) |
53
- | LeViT | float | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | QNN_DLC | 0.817 ms | 0 - 152 MB | NPU | [LeViT.dlc](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT.dlc) |
54
- | LeViT | float | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | ONNX | 0.847 ms | 0 - 122 MB | NPU | [LeViT.onnx.zip](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT.onnx.zip) |
55
- | LeViT | float | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | TFLITE | 0.678 ms | 0 - 155 MB | NPU | [LeViT.tflite](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT.tflite) |
56
- | LeViT | float | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | QNN_DLC | 0.741 ms | 1 - 151 MB | NPU | [LeViT.dlc](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT.dlc) |
57
- | LeViT | float | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | ONNX | 0.813 ms | 1 - 124 MB | NPU | [LeViT.onnx.zip](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT.onnx.zip) |
58
- | LeViT | float | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN_DLC | 1.711 ms | 1 - 1 MB | NPU | [LeViT.dlc](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT.dlc) |
59
- | LeViT | float | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 1.459 ms | 16 - 16 MB | NPU | [LeViT.onnx.zip](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT.onnx.zip) |
60
- | LeViT | w8a16 | Dragonwing Q-6690 MTP | Qualcomm® QCM6690 | QNN_DLC | 5.802 ms | 0 - 141 MB | NPU | [LeViT.dlc](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT_w8a16.dlc) |
61
- | LeViT | w8a16 | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | QNN_DLC | 2.972 ms | 0 - 131 MB | NPU | [LeViT.dlc](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT_w8a16.dlc) |
62
- | LeViT | w8a16 | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | QNN_DLC | 1.419 ms | 0 - 3 MB | NPU | [LeViT.dlc](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT_w8a16.dlc) |
63
- | LeViT | w8a16 | QCS9075 (Proxy) | Qualcomm® QCS9075 (Proxy) | QNN_DLC | 7.214 ms | 0 - 131 MB | NPU | [LeViT.dlc](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT_w8a16.dlc) |
64
- | LeViT | w8a16 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | QNN_DLC | 0.996 ms | 0 - 160 MB | NPU | [LeViT.dlc](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT_w8a16.dlc) |
65
- | LeViT | w8a16 | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | QNN_DLC | 0.736 ms | 0 - 131 MB | NPU | [LeViT.dlc](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT_w8a16.dlc) |
66
- | LeViT | w8a16 | Snapdragon 7 Gen 4 QRD | Snapdragon® 7 Gen 4 Mobile | QNN_DLC | 1.48 ms | 0 - 136 MB | NPU | [LeViT.dlc](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT_w8a16.dlc) |
67
- | LeViT | w8a16 | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | QNN_DLC | 0.632 ms | 0 - 133 MB | NPU | [LeViT.dlc](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT_w8a16.dlc) |
68
- | LeViT | w8a16 | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN_DLC | 1.63 ms | 0 - 0 MB | NPU | [LeViT.dlc](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT_w8a16.dlc) |
69
- | LeViT | w8a16_mixed_int16 | Dragonwing Q-6690 MTP | Qualcomm® QCM6690 | QNN_DLC | 6.094 ms | 0 - 142 MB | NPU | [LeViT.dlc](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT_w8a16_mixed_int16.dlc) |
70
- | LeViT | w8a16_mixed_int16 | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | QNN_DLC | 3.039 ms | 0 - 131 MB | NPU | [LeViT.dlc](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT_w8a16_mixed_int16.dlc) |
71
- | LeViT | w8a16_mixed_int16 | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | QNN_DLC | 1.46 ms | 0 - 3 MB | NPU | [LeViT.dlc](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT_w8a16_mixed_int16.dlc) |
72
- | LeViT | w8a16_mixed_int16 | QCS9075 (Proxy) | Qualcomm® QCS9075 (Proxy) | QNN_DLC | 1.741 ms | 0 - 131 MB | NPU | [LeViT.dlc](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT_w8a16_mixed_int16.dlc) |
73
- | LeViT | w8a16_mixed_int16 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | QNN_DLC | 1.015 ms | 0 - 161 MB | NPU | [LeViT.dlc](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT_w8a16_mixed_int16.dlc) |
74
- | LeViT | w8a16_mixed_int16 | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | QNN_DLC | 0.751 ms | 0 - 134 MB | NPU | [LeViT.dlc](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT_w8a16_mixed_int16.dlc) |
75
- | LeViT | w8a16_mixed_int16 | Snapdragon 7 Gen 4 QRD | Snapdragon® 7 Gen 4 Mobile | QNN_DLC | 1.51 ms | 0 - 135 MB | NPU | [LeViT.dlc](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT_w8a16_mixed_int16.dlc) |
76
- | LeViT | w8a16_mixed_int16 | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | QNN_DLC | 0.648 ms | 0 - 132 MB | NPU | [LeViT.dlc](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT_w8a16_mixed_int16.dlc) |
77
- | LeViT | w8a16_mixed_int16 | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN_DLC | 1.669 ms | 0 - 0 MB | NPU | [LeViT.dlc](https://huggingface.co/qualcomm/LeViT/blob/main/LeViT_w8a16_mixed_int16.dlc) |
78
-
79
-
80
-
81
-
82
- ## Installation
83
-
84
-
85
- Install the package via pip:
86
- ```bash
87
- # NOTE: 3.10 <= PYTHON_VERSION < 3.14 is supported.
88
- pip install "qai-hub-models[levit]"
89
- ```
90
-
91
-
92
- ## Configure Qualcomm® AI Hub Workbench to run this model on a cloud-hosted device
93
-
94
- Sign-in to [Qualcomm® AI Hub Workbench](https://workbench.aihub.qualcomm.com/) with your
95
- Qualcomm® ID. Once signed in navigate to `Account -> Settings -> API Token`.
96
-
97
- With this API token, you can configure your client to run models on the cloud
98
- hosted devices.
99
- ```bash
100
- qai-hub configure --api_token API_TOKEN
101
- ```
102
- Navigate to [docs](https://workbench.aihub.qualcomm.com/docs/) for more information.
103
-
104
-
105
-
106
- ## Demo off target
107
-
108
- The package contains a simple end-to-end demo that downloads pre-trained
109
- weights and runs this model on a sample input.
110
-
111
- ```bash
112
- python -m qai_hub_models.models.levit.demo
113
- ```
114
-
115
- The above demo runs a reference implementation of pre-processing, model
116
- inference, and post processing.
117
-
118
- **NOTE**: If you want running in a Jupyter Notebook or Google Colab like
119
- environment, please add the following to your cell (instead of the above).
120
- ```
121
- %run -m qai_hub_models.models.levit.demo
122
- ```
123
-
124
-
125
- ### Run model on a cloud-hosted device
126
-
127
- In addition to the demo, you can also run the model on a cloud-hosted Qualcomm®
128
- device. This script does the following:
129
- * Performance check on-device on a cloud-hosted device
130
- * Downloads compiled assets that can be deployed on-device for Android.
131
- * Accuracy check between PyTorch and on-device outputs.
132
-
133
- ```bash
134
- python -m qai_hub_models.models.levit.export
135
- ```
136
-
137
-
138
-
139
- ## How does this work?
140
-
141
- This [export script](https://aihub.qualcomm.com/models/levit/qai_hub_models/models/LeViT/export.py)
142
- leverages [Qualcomm® AI Hub](https://aihub.qualcomm.com/) to optimize, validate, and deploy this model
143
- on-device. Lets go through each step below in detail:
144
-
145
- Step 1: **Compile model for on-device deployment**
146
-
147
- To compile a PyTorch model for on-device deployment, we first trace the model
148
- in memory using the `jit.trace` and then call the `submit_compile_job` API.
149
-
150
- ```python
151
- import torch
152
-
153
- import qai_hub as hub
154
- from qai_hub_models.models.levit import Model
155
-
156
- # Load the model
157
- torch_model = Model.from_pretrained()
158
-
159
- # Device
160
- device = hub.Device("Samsung Galaxy S25")
161
-
162
- # Trace model
163
- input_shape = torch_model.get_input_spec()
164
- sample_inputs = torch_model.sample_inputs()
165
-
166
- pt_model = torch.jit.trace(torch_model, [torch.tensor(data[0]) for _, data in sample_inputs.items()])
167
-
168
- # Compile model on a specific device
169
- compile_job = hub.submit_compile_job(
170
- model=pt_model,
171
- device=device,
172
- input_specs=torch_model.get_input_spec(),
173
- )
174
-
175
- # Get target model to run on-device
176
- target_model = compile_job.get_target_model()
177
-
178
- ```
179
-
180
-
181
- Step 2: **Performance profiling on cloud-hosted device**
182
-
183
- After compiling models from step 1. Models can be profiled model on-device using the
184
- `target_model`. Note that this scripts runs the model on a device automatically
185
- provisioned in the cloud. Once the job is submitted, you can navigate to a
186
- provided job URL to view a variety of on-device performance metrics.
187
- ```python
188
- profile_job = hub.submit_profile_job(
189
- model=target_model,
190
- device=device,
191
- )
192
-
193
- ```
194
-
195
- Step 3: **Verify on-device accuracy**
196
-
197
- To verify the accuracy of the model on-device, you can run on-device inference
198
- on sample input data on the same cloud hosted device.
199
- ```python
200
- input_data = torch_model.sample_inputs()
201
- inference_job = hub.submit_inference_job(
202
- model=target_model,
203
- device=device,
204
- inputs=input_data,
205
- )
206
- on_device_output = inference_job.download_output_data()
207
-
208
- ```
209
- With the output of the model, you can compute like PSNR, relative errors or
210
- spot check the output with expected output.
211
-
212
- **Note**: This on-device profiling and inference requires access to Qualcomm®
213
- AI Hub Workbench. [Sign up for access](https://myaccount.qualcomm.com/signup).
214
-
215
-
216
-
217
- ## Run demo on a cloud-hosted device
218
-
219
- You can also run the demo on-device.
220
-
221
- ```bash
222
- python -m qai_hub_models.models.levit.demo --eval-mode on-device
223
- ```
224
-
225
- **NOTE**: If you want running in a Jupyter Notebook or Google Colab like
226
- environment, please add the following to your cell (instead of the above).
227
- ```
228
- %run -m qai_hub_models.models.levit.demo -- --eval-mode on-device
229
- ```
230
-
231
-
232
- ## Deploying compiled model to Android
233
-
234
-
235
- The models can be deployed using multiple runtimes:
236
- - TensorFlow Lite (`.tflite` export): [This
237
- tutorial](https://www.tensorflow.org/lite/android/quickstart) provides a
238
- guide to deploy the .tflite model in an Android application.
239
-
240
-
241
- - QNN (`.so` export ): This [sample
242
- app](https://docs.qualcomm.com/bundle/publicresource/topics/80-63442-50/sample_app.html)
243
- provides instructions on how to use the `.so` shared library in an Android application.
244
-
245
-
246
- ## View on Qualcomm® AI Hub
247
- Get more details on LeViT's performance across various devices [here](https://aihub.qualcomm.com/models/levit).
248
- Explore all available models on [Qualcomm® AI Hub](https://aihub.qualcomm.com/)
249
-
250
 
251
  ## License
252
  * The license for the original implementation of LeViT can be found
253
  [here](https://github.com/facebookresearch/LeViT?tab=Apache-2.0-1-ov-file).
254
 
255
-
256
-
257
  ## References
258
  * [LeViT: a Vision Transformer in ConvNet's Clothing for Faster Inference](https://arxiv.org/abs/2104.01136)
259
  * [Source Model Implementation](https://github.com/facebookresearch/LeViT)
260
 
261
-
262
-
263
  ## Community
264
  * Join [our AI Hub Slack community](https://aihub.qualcomm.com/community/slack) to collaborate, post questions and learn more about on-device AI.
265
  * For questions or feedback please [reach out to us](mailto:ai-hub-support@qti.qualcomm.com).
266
-
267
-
 
10
 
11
  ![](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/levit/web-assets/model_demo.png)
12
 
13
+ # LeViT: Optimized for Qualcomm Devices
 
 
14
 
15
  LeViT is a vision transformer model that can classify images from the Imagenet dataset.
16
 
17
+ This is based on the implementation of LeViT found [here](https://github.com/facebookresearch/LeViT).
18
+ 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/levit) library to export with custom configurations. More details on model performance across various devices, can be found [here](#performance-summary).
19
+
20
+ 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.
21
+
22
+ ## Getting Started
23
+ There are two ways to deploy this model on your device:
24
+
25
+ ### Option 1: Download Pre-Exported Models
26
+
27
+ Below are pre-exported model assets ready for deployment.
28
+
29
+ | Runtime | Precision | Chipset | SDK Versions | Download |
30
+ |---|---|---|---|---|
31
+ | 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/levit/releases/v0.46.1/levit-onnx-float.zip)
32
+ | 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/levit/releases/v0.46.1/levit-onnx-w8a16.zip)
33
+ | ONNX | w8a16_mixed_int16 | Universal | QAIRT 2.37, ONNX Runtime 1.23.0 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/levit/releases/v0.46.1/levit-onnx-w8a16_mixed_int16.zip)
34
+ | QNN_DLC | float | Universal | QAIRT 2.42 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/levit/releases/v0.46.1/levit-qnn_dlc-float.zip)
35
+ | QNN_DLC | w8a16 | Universal | QAIRT 2.42 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/levit/releases/v0.46.1/levit-qnn_dlc-w8a16.zip)
36
+ | QNN_DLC | w8a16_mixed_int16 | Universal | QAIRT 2.42 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/levit/releases/v0.46.1/levit-qnn_dlc-w8a16_mixed_int16.zip)
37
+ | 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/levit/releases/v0.46.1/levit-tflite-float.zip)
38
+
39
+ For more device-specific assets and performance metrics, visit **[LeViT on Qualcomm® AI Hub](https://aihub.qualcomm.com/models/levit)**.
40
+
41
+
42
+ ### Option 2: Export with Custom Configurations
43
+
44
+ Use the [Qualcomm® AI Hub Models](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/models/levit) Python library to compile and export the model with your own:
45
+ - Custom weights (e.g., fine-tuned checkpoints)
46
+ - Custom input shapes
47
+ - Target device and runtime configurations
48
+
49
+ This option is ideal if you need to customize the model beyond the default configuration provided here.
50
+
51
+ See our repository for [LeViT on GitHub](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/models/levit) for usage instructions.
52
+
53
+ ## Model Details
54
+
55
+ **Model Type:** Model_use_case.image_classification
56
+
57
+ **Model Stats:**
58
+ - Model checkpoint: LeViT-128S
59
+ - Input resolution: 224x224
60
+ - Number of parameters: 7.82M
61
+ - Model size (float): 29.9 MB
62
+ - Model size (w8a16): 8.83 MB
63
+
64
+ ## Performance Summary
65
+ | Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit
66
+ |---|---|---|---|---|---|---
67
+ | LeViT | ONNX | float | Snapdragon® X Elite | 1.467 ms | 16 - 16 MB | NPU
68
+ | LeViT | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 1.094 ms | 0 - 148 MB | NPU
69
+ | LeViT | ONNX | float | Qualcomm® QCS8550 (Proxy) | 1.51 ms | 0 - 22 MB | NPU
70
+ | LeViT | ONNX | float | Qualcomm® QCS9075 | 1.841 ms | 1 - 3 MB | NPU
71
+ | LeViT | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 0.899 ms | 0 - 124 MB | NPU
72
+ | LeViT | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 0.818 ms | 0 - 123 MB | NPU
73
+ | LeViT | QNN_DLC | float | Snapdragon® X Elite | 1.796 ms | 1 - 1 MB | NPU
74
+ | LeViT | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 1.073 ms | 0 - 82 MB | NPU
75
+ | LeViT | QNN_DLC | float | Qualcomm® QCS8275 (Proxy) | 3.802 ms | 1 - 59 MB | NPU
76
+ | LeViT | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 1.556 ms | 1 - 2 MB | NPU
77
+ | LeViT | QNN_DLC | float | Qualcomm® QCS9075 | 1.872 ms | 3 - 5 MB | NPU
78
+ | LeViT | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 2.373 ms | 0 - 81 MB | NPU
79
+ | LeViT | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 0.828 ms | 0 - 58 MB | NPU
80
+ | LeViT | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 0.733 ms | 1 - 62 MB | NPU
81
+ | LeViT | QNN_DLC | w8a16 | Snapdragon® X Elite | 1.633 ms | 0 - 0 MB | NPU
82
+ | LeViT | QNN_DLC | w8a16 | Snapdragon® 8 Gen 3 Mobile | 1.005 ms | 0 - 61 MB | NPU
83
+ | LeViT | QNN_DLC | w8a16 | Qualcomm® QCS8275 (Proxy) | 2.968 ms | 0 - 41 MB | NPU
84
+ | LeViT | QNN_DLC | w8a16 | Qualcomm® QCS8550 (Proxy) | 1.426 ms | 0 - 14 MB | NPU
85
+ | LeViT | QNN_DLC | w8a16 | Qualcomm® QCS9075 | 1.725 ms | 0 - 2 MB | NPU
86
+ | LeViT | QNN_DLC | w8a16 | Qualcomm® QCM6690 | 5.551 ms | 0 - 165 MB | NPU
87
+ | LeViT | QNN_DLC | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 0.738 ms | 0 - 42 MB | NPU
88
+ | LeViT | QNN_DLC | w8a16 | Snapdragon® 7 Gen 4 Mobile | 1.461 ms | 0 - 39 MB | NPU
89
+ | LeViT | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 0.634 ms | 0 - 42 MB | NPU
90
+ | LeViT | QNN_DLC | w8a16_mixed_int16 | Snapdragon® X Elite | 1.692 ms | 0 - 0 MB | NPU
91
+ | LeViT | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 8 Gen 3 Mobile | 1.014 ms | 0 - 62 MB | NPU
92
+ | LeViT | QNN_DLC | w8a16_mixed_int16 | Qualcomm® QCS8275 (Proxy) | 3.041 ms | 0 - 40 MB | NPU
93
+ | LeViT | QNN_DLC | w8a16_mixed_int16 | Qualcomm® QCS8550 (Proxy) | 1.465 ms | 0 - 2 MB | NPU
94
+ | LeViT | QNN_DLC | w8a16_mixed_int16 | Qualcomm® QCS9075 | 1.726 ms | 0 - 2 MB | NPU
95
+ | LeViT | QNN_DLC | w8a16_mixed_int16 | Qualcomm® QCM6690 | 5.877 ms | 0 - 166 MB | NPU
96
+ | LeViT | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 8 Elite For Galaxy Mobile | 0.753 ms | 0 - 41 MB | NPU
97
+ | LeViT | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 7 Gen 4 Mobile | 1.496 ms | 0 - 39 MB | NPU
98
+ | LeViT | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 8 Elite Gen 5 Mobile | 0.647 ms | 0 - 41 MB | NPU
99
+ | LeViT | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 1.035 ms | 0 - 97 MB | NPU
100
+ | LeViT | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 4.035 ms | 0 - 70 MB | NPU
101
+ | LeViT | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 1.514 ms | 0 - 3 MB | NPU
102
+ | LeViT | TFLITE | float | Qualcomm® QCS9075 | 1.883 ms | 0 - 19 MB | NPU
103
+ | LeViT | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 2.348 ms | 0 - 93 MB | NPU
104
+ | LeViT | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 0.787 ms | 0 - 77 MB | NPU
105
+ | LeViT | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 0.679 ms | 0 - 78 MB | NPU
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
 
107
  ## License
108
  * The license for the original implementation of LeViT can be found
109
  [here](https://github.com/facebookresearch/LeViT?tab=Apache-2.0-1-ov-file).
110
 
 
 
111
  ## References
112
  * [LeViT: a Vision Transformer in ConvNet's Clothing for Faster Inference](https://arxiv.org/abs/2104.01136)
113
  * [Source Model Implementation](https://github.com/facebookresearch/LeViT)
114
 
 
 
115
  ## Community
116
  * Join [our AI Hub Slack community](https://aihub.qualcomm.com/community/slack) to collaborate, post questions and learn more about on-device AI.
117
  * For questions or feedback please [reach out to us](mailto:ai-hub-support@qti.qualcomm.com).
 
 
tool-versions.yaml DELETED
@@ -1,3 +0,0 @@
1
- tool_versions:
2
- qnn_dlc:
3
- qairt: 2.41.0.251128145156_191518