Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
@@ -35,29 +35,30 @@ More details on model performance across various devices, can be found
|
|
35 |
|
36 |
| Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
|
37 |
|---|---|---|---|---|---|---|---|---|
|
38 |
-
| ResNet50 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 2.
|
39 |
-
| ResNet50 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 2.
|
40 |
-
| ResNet50 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 2.
|
41 |
-
| ResNet50 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 1.
|
42 |
-
| ResNet50 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 1.
|
43 |
-
| ResNet50 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 1.
|
44 |
-
| ResNet50 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 1.
|
45 |
-
| ResNet50 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 1.
|
46 |
-
| ResNet50 |
|
47 |
-
| ResNet50 | QCS8550 (Proxy) | QCS8550 Proxy |
|
48 |
-
| ResNet50 |
|
49 |
-
| ResNet50 |
|
50 |
-
| ResNet50 | SA8255 (Proxy) | SA8255P Proxy |
|
51 |
-
| ResNet50 |
|
52 |
-
| ResNet50 |
|
53 |
-
| ResNet50 |
|
54 |
-
| ResNet50 | SA8650 (Proxy) | SA8650P Proxy |
|
55 |
-
| ResNet50 |
|
56 |
-
| ResNet50 |
|
57 |
-
| ResNet50 |
|
58 |
-
| ResNet50 | QCS8450 (Proxy) | QCS8450 Proxy |
|
59 |
-
| ResNet50 |
|
60 |
-
| ResNet50 | Snapdragon X Elite CRD | Snapdragon® X Elite |
|
|
|
61 |
|
62 |
|
63 |
|
@@ -122,7 +123,7 @@ ResNet50
|
|
122 |
Device : Samsung Galaxy S23 (13)
|
123 |
Runtime : TFLITE
|
124 |
Estimated inference time (ms) : 2.3
|
125 |
-
Estimated peak memory usage (MB): [0,
|
126 |
Total # Ops : 79
|
127 |
Compute Unit(s) : NPU (79 ops)
|
128 |
```
|
@@ -143,13 +144,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 import
|
147 |
|
148 |
# Load the model
|
|
|
149 |
|
150 |
# Device
|
151 |
device = hub.Device("Samsung Galaxy S23")
|
152 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
|
154 |
```
|
155 |
|
|
|
35 |
|
36 |
| Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
|
37 |
|---|---|---|---|---|---|---|---|---|
|
38 |
+
| ResNet50 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 2.27 ms | 0 - 233 MB | FP16 | NPU | [ResNet50.tflite](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.tflite) |
|
39 |
+
| ResNet50 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 2.386 ms | 0 - 173 MB | FP16 | NPU | [ResNet50.so](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.so) |
|
40 |
+
| ResNet50 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 2.297 ms | 1 - 2 MB | FP16 | NPU | [ResNet50.onnx](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.onnx) |
|
41 |
+
| ResNet50 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 1.597 ms | 0 - 27 MB | FP16 | NPU | [ResNet50.tflite](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.tflite) |
|
42 |
+
| ResNet50 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 1.71 ms | 0 - 24 MB | FP16 | NPU | [ResNet50.so](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.so) |
|
43 |
+
| ResNet50 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 1.722 ms | 1 - 81 MB | FP16 | NPU | [ResNet50.onnx](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.onnx) |
|
44 |
+
| ResNet50 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 1.593 ms | 0 - 23 MB | FP16 | NPU | [ResNet50.tflite](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.tflite) |
|
45 |
+
| ResNet50 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 1.635 ms | 0 - 22 MB | FP16 | NPU | Use Export Script |
|
46 |
+
| ResNet50 | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 2.271 ms | 0 - 243 MB | FP16 | NPU | [ResNet50.tflite](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.tflite) |
|
47 |
+
| ResNet50 | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 2.172 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
|
48 |
+
| ResNet50 | SA7255P ADP | SA7255P | TFLITE | 76.242 ms | 0 - 21 MB | FP16 | NPU | [ResNet50.tflite](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.tflite) |
|
49 |
+
| ResNet50 | SA7255P ADP | SA7255P | QNN | 77.456 ms | 1 - 6 MB | FP16 | NPU | Use Export Script |
|
50 |
+
| ResNet50 | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 2.273 ms | 2 - 246 MB | FP16 | NPU | [ResNet50.tflite](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.tflite) |
|
51 |
+
| ResNet50 | SA8255 (Proxy) | SA8255P Proxy | QNN | 2.189 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
|
52 |
+
| ResNet50 | SA8295P ADP | SA8295P | TFLITE | 3.761 ms | 0 - 15 MB | FP16 | NPU | [ResNet50.tflite](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.tflite) |
|
53 |
+
| ResNet50 | SA8295P ADP | SA8295P | QNN | 4.067 ms | 0 - 6 MB | FP16 | NPU | Use Export Script |
|
54 |
+
| ResNet50 | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 2.27 ms | 0 - 243 MB | FP16 | NPU | [ResNet50.tflite](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.tflite) |
|
55 |
+
| ResNet50 | SA8650 (Proxy) | SA8650P Proxy | QNN | 2.179 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
|
56 |
+
| ResNet50 | SA8775P ADP | SA8775P | TFLITE | 4.111 ms | 0 - 21 MB | FP16 | NPU | [ResNet50.tflite](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.tflite) |
|
57 |
+
| ResNet50 | SA8775P ADP | SA8775P | QNN | 4.234 ms | 1 - 6 MB | FP16 | NPU | Use Export Script |
|
58 |
+
| ResNet50 | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 3.122 ms | 0 - 20 MB | FP16 | NPU | [ResNet50.tflite](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.tflite) |
|
59 |
+
| ResNet50 | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 3.141 ms | 1 - 18 MB | FP16 | NPU | Use Export Script |
|
60 |
+
| ResNet50 | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 2.296 ms | 1 - 1 MB | FP16 | NPU | Use Export Script |
|
61 |
+
| ResNet50 | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 2.326 ms | 50 - 50 MB | FP16 | NPU | [ResNet50.onnx](https://huggingface.co/qualcomm/ResNet50/blob/main/ResNet50.onnx) |
|
62 |
|
63 |
|
64 |
|
|
|
123 |
Device : Samsung Galaxy S23 (13)
|
124 |
Runtime : TFLITE
|
125 |
Estimated inference time (ms) : 2.3
|
126 |
+
Estimated peak memory usage (MB): [0, 233]
|
127 |
Total # Ops : 79
|
128 |
Compute Unit(s) : NPU (79 ops)
|
129 |
```
|
|
|
144 |
import torch
|
145 |
|
146 |
import qai_hub as hub
|
147 |
+
from qai_hub_models.models.resnet50 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 |
|