Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
@@ -36,28 +36,30 @@ More details on model performance across various devices, can be found
|
|
36 |
|
37 |
| Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
|
38 |
|---|---|---|---|---|---|---|---|---|
|
39 |
-
| ResNet50Quantized | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 0.
|
40 |
-
| ResNet50Quantized | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN |
|
41 |
-
| ResNet50Quantized | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 0.
|
42 |
-
| ResNet50Quantized | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 0.
|
43 |
-
| ResNet50Quantized | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 0.
|
44 |
-
| ResNet50Quantized | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 0.
|
45 |
-
| ResNet50Quantized | RB3 Gen 2 (Proxy) | QCS6490 Proxy | TFLITE | 2.
|
46 |
-
| ResNet50Quantized | RB3 Gen 2 (Proxy) | QCS6490 Proxy | QNN |
|
47 |
-
| ResNet50Quantized | RB5 (Proxy) | QCS8250 Proxy | TFLITE | 11.
|
48 |
-
| ResNet50Quantized | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 0.
|
49 |
-
| ResNet50Quantized | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 0.
|
50 |
-
| ResNet50Quantized |
|
51 |
-
| ResNet50Quantized |
|
52 |
-
| ResNet50Quantized |
|
53 |
-
| ResNet50Quantized |
|
54 |
-
| ResNet50Quantized |
|
55 |
-
| ResNet50Quantized |
|
56 |
-
| ResNet50Quantized |
|
57 |
-
| ResNet50Quantized |
|
58 |
-
| ResNet50Quantized |
|
59 |
-
| ResNet50Quantized |
|
60 |
-
| ResNet50Quantized |
|
|
|
|
|
61 |
|
62 |
|
63 |
|
@@ -122,7 +124,7 @@ ResNet50Quantized
|
|
122 |
Device : Samsung Galaxy S23 (13)
|
123 |
Runtime : TFLITE
|
124 |
Estimated inference time (ms) : 0.8
|
125 |
-
Estimated peak memory usage (MB): [0,
|
126 |
Total # Ops : 82
|
127 |
Compute Unit(s) : NPU (82 ops)
|
128 |
```
|
@@ -143,13 +145,29 @@ in memory using the `jit.trace` and then call the `submit_compile_job` API.
|
|
143 |
import torch
|
144 |
|
145 |
import qai_hub as hub
|
146 |
-
from qai_hub_models.models.resnet50_quantized import
|
147 |
|
148 |
# Load the model
|
|
|
149 |
|
150 |
# Device
|
151 |
device = hub.Device("Samsung Galaxy S23")
|
152 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
|
154 |
```
|
155 |
|
|
|
36 |
|
37 |
| Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
|
38 |
|---|---|---|---|---|---|---|---|---|
|
39 |
+
| ResNet50Quantized | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 0.789 ms | 0 - 44 MB | INT8 | NPU | [ResNet50Quantized.tflite](https://huggingface.co/qualcomm/ResNet50Quantized/blob/main/ResNet50Quantized.tflite) |
|
40 |
+
| ResNet50Quantized | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 1.01 ms | 0 - 32 MB | INT8 | NPU | [ResNet50Quantized.so](https://huggingface.co/qualcomm/ResNet50Quantized/blob/main/ResNet50Quantized.so) |
|
41 |
+
| ResNet50Quantized | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 0.597 ms | 0 - 22 MB | INT8 | NPU | [ResNet50Quantized.tflite](https://huggingface.co/qualcomm/ResNet50Quantized/blob/main/ResNet50Quantized.tflite) |
|
42 |
+
| ResNet50Quantized | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 0.755 ms | 0 - 17 MB | INT8 | NPU | [ResNet50Quantized.so](https://huggingface.co/qualcomm/ResNet50Quantized/blob/main/ResNet50Quantized.so) |
|
43 |
+
| ResNet50Quantized | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 0.544 ms | 0 - 17 MB | INT8 | NPU | [ResNet50Quantized.tflite](https://huggingface.co/qualcomm/ResNet50Quantized/blob/main/ResNet50Quantized.tflite) |
|
44 |
+
| ResNet50Quantized | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 0.726 ms | 0 - 17 MB | INT8 | NPU | Use Export Script |
|
45 |
+
| ResNet50Quantized | RB3 Gen 2 (Proxy) | QCS6490 Proxy | TFLITE | 2.713 ms | 0 - 22 MB | INT8 | NPU | [ResNet50Quantized.tflite](https://huggingface.co/qualcomm/ResNet50Quantized/blob/main/ResNet50Quantized.tflite) |
|
46 |
+
| ResNet50Quantized | RB3 Gen 2 (Proxy) | QCS6490 Proxy | QNN | 3.965 ms | 0 - 8 MB | INT8 | NPU | Use Export Script |
|
47 |
+
| ResNet50Quantized | RB5 (Proxy) | QCS8250 Proxy | TFLITE | 11.577 ms | 0 - 2 MB | INT8 | NPU | [ResNet50Quantized.tflite](https://huggingface.co/qualcomm/ResNet50Quantized/blob/main/ResNet50Quantized.tflite) |
|
48 |
+
| ResNet50Quantized | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 0.786 ms | 0 - 34 MB | INT8 | NPU | [ResNet50Quantized.tflite](https://huggingface.co/qualcomm/ResNet50Quantized/blob/main/ResNet50Quantized.tflite) |
|
49 |
+
| ResNet50Quantized | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 0.945 ms | 0 - 2 MB | INT8 | NPU | Use Export Script |
|
50 |
+
| ResNet50Quantized | SA7255P ADP | SA7255P | TFLITE | 8.838 ms | 0 - 15 MB | INT8 | NPU | [ResNet50Quantized.tflite](https://huggingface.co/qualcomm/ResNet50Quantized/blob/main/ResNet50Quantized.tflite) |
|
51 |
+
| ResNet50Quantized | SA7255P ADP | SA7255P | QNN | 9.593 ms | 0 - 5 MB | INT8 | NPU | Use Export Script |
|
52 |
+
| ResNet50Quantized | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 0.79 ms | 0 - 265 MB | INT8 | NPU | [ResNet50Quantized.tflite](https://huggingface.co/qualcomm/ResNet50Quantized/blob/main/ResNet50Quantized.tflite) |
|
53 |
+
| ResNet50Quantized | SA8255 (Proxy) | SA8255P Proxy | QNN | 0.952 ms | 0 - 2 MB | INT8 | NPU | Use Export Script |
|
54 |
+
| ResNet50Quantized | SA8295P ADP | SA8295P | TFLITE | 1.241 ms | 0 - 14 MB | INT8 | NPU | [ResNet50Quantized.tflite](https://huggingface.co/qualcomm/ResNet50Quantized/blob/main/ResNet50Quantized.tflite) |
|
55 |
+
| ResNet50Quantized | SA8295P ADP | SA8295P | QNN | 1.874 ms | 0 - 6 MB | INT8 | NPU | Use Export Script |
|
56 |
+
| ResNet50Quantized | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 0.781 ms | 0 - 43 MB | INT8 | NPU | [ResNet50Quantized.tflite](https://huggingface.co/qualcomm/ResNet50Quantized/blob/main/ResNet50Quantized.tflite) |
|
57 |
+
| ResNet50Quantized | SA8650 (Proxy) | SA8650P Proxy | QNN | 0.951 ms | 0 - 1 MB | INT8 | NPU | Use Export Script |
|
58 |
+
| ResNet50Quantized | SA8775P ADP | SA8775P | TFLITE | 1.081 ms | 0 - 16 MB | INT8 | NPU | [ResNet50Quantized.tflite](https://huggingface.co/qualcomm/ResNet50Quantized/blob/main/ResNet50Quantized.tflite) |
|
59 |
+
| ResNet50Quantized | SA8775P ADP | SA8775P | QNN | 1.462 ms | 0 - 6 MB | INT8 | NPU | Use Export Script |
|
60 |
+
| ResNet50Quantized | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 0.906 ms | 0 - 23 MB | INT8 | NPU | [ResNet50Quantized.tflite](https://huggingface.co/qualcomm/ResNet50Quantized/blob/main/ResNet50Quantized.tflite) |
|
61 |
+
| ResNet50Quantized | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 1.13 ms | 0 - 18 MB | INT8 | NPU | Use Export Script |
|
62 |
+
| ResNet50Quantized | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 1.419 ms | 0 - 0 MB | INT8 | NPU | Use Export Script |
|
63 |
|
64 |
|
65 |
|
|
|
124 |
Device : Samsung Galaxy S23 (13)
|
125 |
Runtime : TFLITE
|
126 |
Estimated inference time (ms) : 0.8
|
127 |
+
Estimated peak memory usage (MB): [0, 44]
|
128 |
Total # Ops : 82
|
129 |
Compute Unit(s) : NPU (82 ops)
|
130 |
```
|
|
|
145 |
import torch
|
146 |
|
147 |
import qai_hub as hub
|
148 |
+
from qai_hub_models.models.resnet50_quantized import Model
|
149 |
|
150 |
# Load the model
|
151 |
+
torch_model = Model.from_pretrained()
|
152 |
|
153 |
# Device
|
154 |
device = hub.Device("Samsung Galaxy S23")
|
155 |
|
156 |
+
# Trace model
|
157 |
+
input_shape = torch_model.get_input_spec()
|
158 |
+
sample_inputs = torch_model.sample_inputs()
|
159 |
+
|
160 |
+
pt_model = torch.jit.trace(torch_model, [torch.tensor(data[0]) for _, data in sample_inputs.items()])
|
161 |
+
|
162 |
+
# Compile model on a specific device
|
163 |
+
compile_job = hub.submit_compile_job(
|
164 |
+
model=pt_model,
|
165 |
+
device=device,
|
166 |
+
input_specs=torch_model.get_input_spec(),
|
167 |
+
)
|
168 |
+
|
169 |
+
# Get target model to run on-device
|
170 |
+
target_model = compile_job.get_target_model()
|
171 |
|
172 |
```
|
173 |
|