Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
@@ -34,29 +34,31 @@ More details on model performance across various devices, can be found
|
|
34 |
|
35 |
| Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
|
36 |
|---|---|---|---|---|---|---|---|---|
|
37 |
-
| Shufflenet-v2 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 1.
|
38 |
-
| Shufflenet-v2 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 0.
|
39 |
-
| Shufflenet-v2 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 1.
|
40 |
-
| Shufflenet-v2 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 0.
|
41 |
-
| Shufflenet-v2 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 0.
|
42 |
-
| Shufflenet-v2 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 0.
|
43 |
-
| Shufflenet-v2 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 0.
|
44 |
-
| Shufflenet-v2 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 0.
|
45 |
-
| Shufflenet-v2 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 0.
|
46 |
-
| Shufflenet-v2 | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 1.199 ms | 0 -
|
47 |
-
| Shufflenet-v2 | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 0.
|
48 |
-
| Shufflenet-v2 |
|
49 |
-
| Shufflenet-v2 |
|
50 |
-
| Shufflenet-v2 |
|
51 |
-
| Shufflenet-v2 |
|
52 |
-
| Shufflenet-v2 |
|
53 |
-
| Shufflenet-v2 |
|
54 |
-
| Shufflenet-v2 |
|
55 |
-
| Shufflenet-v2 |
|
56 |
-
| Shufflenet-v2 |
|
57 |
-
| Shufflenet-v2 |
|
58 |
-
| Shufflenet-v2 |
|
59 |
-
| Shufflenet-v2 |
|
|
|
|
|
60 |
|
61 |
|
62 |
|
@@ -121,7 +123,7 @@ Shufflenet-v2
|
|
121 |
Device : Samsung Galaxy S23 (13)
|
122 |
Runtime : TFLITE
|
123 |
Estimated inference time (ms) : 1.2
|
124 |
-
Estimated peak memory usage (MB): [0,
|
125 |
Total # Ops : 204
|
126 |
Compute Unit(s) : NPU (204 ops)
|
127 |
```
|
@@ -142,13 +144,29 @@ in memory using the `jit.trace` and then call the `submit_compile_job` API.
|
|
142 |
import torch
|
143 |
|
144 |
import qai_hub as hub
|
145 |
-
from qai_hub_models.models.shufflenet_v2 import
|
146 |
|
147 |
# Load the model
|
|
|
148 |
|
149 |
# Device
|
150 |
device = hub.Device("Samsung Galaxy S23")
|
151 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
|
153 |
```
|
154 |
|
|
|
34 |
|
35 |
| Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
|
36 |
|---|---|---|---|---|---|---|---|---|
|
37 |
+
| Shufflenet-v2 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 1.205 ms | 0 - 86 MB | FP16 | NPU | [Shufflenet-v2.tflite](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.tflite) |
|
38 |
+
| Shufflenet-v2 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 0.771 ms | 1 - 73 MB | FP16 | NPU | [Shufflenet-v2.so](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.so) |
|
39 |
+
| Shufflenet-v2 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 1.125 ms | 0 - 4 MB | FP16 | NPU | [Shufflenet-v2.onnx](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.onnx) |
|
40 |
+
| Shufflenet-v2 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 0.792 ms | 0 - 11 MB | FP16 | NPU | [Shufflenet-v2.tflite](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.tflite) |
|
41 |
+
| Shufflenet-v2 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 0.512 ms | 0 - 12 MB | FP16 | NPU | [Shufflenet-v2.so](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.so) |
|
42 |
+
| Shufflenet-v2 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 0.72 ms | 0 - 41 MB | FP16 | NPU | [Shufflenet-v2.onnx](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.onnx) |
|
43 |
+
| Shufflenet-v2 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 0.816 ms | 0 - 11 MB | FP16 | NPU | [Shufflenet-v2.tflite](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.tflite) |
|
44 |
+
| Shufflenet-v2 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 0.5 ms | 0 - 10 MB | FP16 | NPU | Use Export Script |
|
45 |
+
| Shufflenet-v2 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 0.787 ms | 0 - 23 MB | FP16 | NPU | [Shufflenet-v2.onnx](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.onnx) |
|
46 |
+
| Shufflenet-v2 | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 1.199 ms | 0 - 27 MB | FP16 | NPU | [Shufflenet-v2.tflite](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.tflite) |
|
47 |
+
| Shufflenet-v2 | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 0.738 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
|
48 |
+
| Shufflenet-v2 | SA7255P ADP | SA7255P | TFLITE | 5.091 ms | 0 - 11 MB | FP16 | NPU | [Shufflenet-v2.tflite](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.tflite) |
|
49 |
+
| Shufflenet-v2 | SA7255P ADP | SA7255P | QNN | 4.553 ms | 1 - 6 MB | FP16 | NPU | Use Export Script |
|
50 |
+
| Shufflenet-v2 | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 1.213 ms | 0 - 15 MB | FP16 | NPU | [Shufflenet-v2.tflite](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.tflite) |
|
51 |
+
| Shufflenet-v2 | SA8255 (Proxy) | SA8255P Proxy | QNN | 0.742 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
|
52 |
+
| Shufflenet-v2 | SA8295P ADP | SA8295P | TFLITE | 1.766 ms | 0 - 10 MB | FP16 | NPU | [Shufflenet-v2.tflite](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.tflite) |
|
53 |
+
| Shufflenet-v2 | SA8295P ADP | SA8295P | QNN | 1.323 ms | 1 - 6 MB | FP16 | NPU | Use Export Script |
|
54 |
+
| Shufflenet-v2 | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 1.236 ms | 0 - 15 MB | FP16 | NPU | [Shufflenet-v2.tflite](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.tflite) |
|
55 |
+
| Shufflenet-v2 | SA8650 (Proxy) | SA8650P Proxy | QNN | 0.742 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
|
56 |
+
| Shufflenet-v2 | SA8775P ADP | SA8775P | TFLITE | 1.816 ms | 0 - 9 MB | FP16 | NPU | [Shufflenet-v2.tflite](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.tflite) |
|
57 |
+
| Shufflenet-v2 | SA8775P ADP | SA8775P | QNN | 1.398 ms | 1 - 6 MB | FP16 | NPU | Use Export Script |
|
58 |
+
| Shufflenet-v2 | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 1.322 ms | 0 - 15 MB | FP16 | NPU | [Shufflenet-v2.tflite](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.tflite) |
|
59 |
+
| Shufflenet-v2 | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 0.892 ms | 0 - 14 MB | FP16 | NPU | Use Export Script |
|
60 |
+
| Shufflenet-v2 | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 0.907 ms | 1 - 1 MB | FP16 | NPU | Use Export Script |
|
61 |
+
| Shufflenet-v2 | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 1.146 ms | 5 - 5 MB | FP16 | NPU | [Shufflenet-v2.onnx](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.onnx) |
|
62 |
|
63 |
|
64 |
|
|
|
123 |
Device : Samsung Galaxy S23 (13)
|
124 |
Runtime : TFLITE
|
125 |
Estimated inference time (ms) : 1.2
|
126 |
+
Estimated peak memory usage (MB): [0, 86]
|
127 |
Total # Ops : 204
|
128 |
Compute Unit(s) : NPU (204 ops)
|
129 |
```
|
|
|
144 |
import torch
|
145 |
|
146 |
import qai_hub as hub
|
147 |
+
from qai_hub_models.models.shufflenet_v2 import Model
|
148 |
|
149 |
# Load the model
|
150 |
+
torch_model = Model.from_pretrained()
|
151 |
|
152 |
# Device
|
153 |
device = hub.Device("Samsung Galaxy S23")
|
154 |
|
155 |
+
# Trace model
|
156 |
+
input_shape = torch_model.get_input_spec()
|
157 |
+
sample_inputs = torch_model.sample_inputs()
|
158 |
+
|
159 |
+
pt_model = torch.jit.trace(torch_model, [torch.tensor(data[0]) for _, data in sample_inputs.items()])
|
160 |
+
|
161 |
+
# Compile model on a specific device
|
162 |
+
compile_job = hub.submit_compile_job(
|
163 |
+
model=pt_model,
|
164 |
+
device=device,
|
165 |
+
input_specs=torch_model.get_input_spec(),
|
166 |
+
)
|
167 |
+
|
168 |
+
# Get target model to run on-device
|
169 |
+
target_model = compile_job.get_target_model()
|
170 |
|
171 |
```
|
172 |
|