Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
@@ -35,29 +35,31 @@ 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 |
-
| RegNet | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 2.
|
39 |
-
| RegNet | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 2.
|
40 |
-
| RegNet | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 2.
|
41 |
-
| RegNet | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 1.
|
42 |
-
| RegNet | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 1.
|
43 |
-
| RegNet | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 1.
|
44 |
-
| RegNet | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 1.
|
45 |
-
| RegNet | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 1.
|
46 |
-
| RegNet | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 1.
|
47 |
-
| RegNet | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 2.023 ms | 0 -
|
48 |
-
| RegNet | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 2.
|
49 |
-
| RegNet |
|
50 |
-
| RegNet |
|
51 |
-
| RegNet |
|
52 |
-
| RegNet |
|
53 |
-
| RegNet |
|
54 |
-
| RegNet |
|
55 |
-
| RegNet |
|
56 |
-
| RegNet |
|
57 |
-
| RegNet |
|
58 |
-
| RegNet |
|
59 |
-
| RegNet |
|
60 |
-
| RegNet |
|
|
|
|
|
61 |
|
62 |
|
63 |
|
@@ -122,7 +124,7 @@ RegNet
|
|
122 |
Device : Samsung Galaxy S23 (13)
|
123 |
Runtime : TFLITE
|
124 |
Estimated inference time (ms) : 2.1
|
125 |
-
Estimated peak memory usage (MB): [0,
|
126 |
Total # Ops : 114
|
127 |
Compute Unit(s) : NPU (114 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.regnet 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 |
+
| RegNet | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 2.054 ms | 0 - 112 MB | FP16 | NPU | [RegNet.tflite](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.tflite) |
|
39 |
+
| RegNet | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 2.113 ms | 0 - 80 MB | FP16 | NPU | [RegNet.so](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.so) |
|
40 |
+
| RegNet | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 2.185 ms | 0 - 43 MB | FP16 | NPU | [RegNet.onnx](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.onnx) |
|
41 |
+
| RegNet | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 1.405 ms | 0 - 27 MB | FP16 | NPU | [RegNet.tflite](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.tflite) |
|
42 |
+
| RegNet | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 1.527 ms | 0 - 28 MB | FP16 | NPU | [RegNet.so](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.so) |
|
43 |
+
| RegNet | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 1.605 ms | 0 - 145 MB | FP16 | NPU | [RegNet.onnx](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.onnx) |
|
44 |
+
| RegNet | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 1.388 ms | 0 - 28 MB | FP16 | NPU | [RegNet.tflite](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.tflite) |
|
45 |
+
| RegNet | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 1.233 ms | 1 - 28 MB | FP16 | NPU | Use Export Script |
|
46 |
+
| RegNet | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 1.312 ms | 0 - 74 MB | FP16 | NPU | [RegNet.onnx](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.onnx) |
|
47 |
+
| RegNet | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 2.023 ms | 0 - 122 MB | FP16 | NPU | [RegNet.tflite](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.tflite) |
|
48 |
+
| RegNet | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 2.024 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
|
49 |
+
| RegNet | SA7255P ADP | SA7255P | TFLITE | 69.226 ms | 0 - 27 MB | FP16 | NPU | [RegNet.tflite](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.tflite) |
|
50 |
+
| RegNet | SA7255P ADP | SA7255P | QNN | 69.73 ms | 0 - 6 MB | FP16 | NPU | Use Export Script |
|
51 |
+
| RegNet | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 2.076 ms | 0 - 112 MB | FP16 | NPU | [RegNet.tflite](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.tflite) |
|
52 |
+
| RegNet | SA8255 (Proxy) | SA8255P Proxy | QNN | 2.04 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
|
53 |
+
| RegNet | SA8295P ADP | SA8295P | TFLITE | 3.547 ms | 0 - 22 MB | FP16 | NPU | [RegNet.tflite](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.tflite) |
|
54 |
+
| RegNet | SA8295P ADP | SA8295P | QNN | 3.715 ms | 1 - 6 MB | FP16 | NPU | Use Export Script |
|
55 |
+
| RegNet | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 2.048 ms | 0 - 112 MB | FP16 | NPU | [RegNet.tflite](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.tflite) |
|
56 |
+
| RegNet | SA8650 (Proxy) | SA8650P Proxy | QNN | 2.017 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
|
57 |
+
| RegNet | SA8775P ADP | SA8775P | TFLITE | 3.959 ms | 0 - 26 MB | FP16 | NPU | [RegNet.tflite](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.tflite) |
|
58 |
+
| RegNet | SA8775P ADP | SA8775P | QNN | 4.12 ms | 0 - 6 MB | FP16 | NPU | Use Export Script |
|
59 |
+
| RegNet | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 2.835 ms | 0 - 24 MB | FP16 | NPU | [RegNet.tflite](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.tflite) |
|
60 |
+
| RegNet | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 2.95 ms | 1 - 24 MB | FP16 | NPU | Use Export Script |
|
61 |
+
| RegNet | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 2.226 ms | 1 - 1 MB | FP16 | NPU | Use Export Script |
|
62 |
+
| RegNet | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 2.204 ms | 40 - 40 MB | FP16 | NPU | [RegNet.onnx](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.onnx) |
|
63 |
|
64 |
|
65 |
|
|
|
124 |
Device : Samsung Galaxy S23 (13)
|
125 |
Runtime : TFLITE
|
126 |
Estimated inference time (ms) : 2.1
|
127 |
+
Estimated peak memory usage (MB): [0, 112]
|
128 |
Total # Ops : 114
|
129 |
Compute Unit(s) : NPU (114 ops)
|
130 |
```
|
|
|
145 |
import torch
|
146 |
|
147 |
import qai_hub as hub
|
148 |
+
from qai_hub_models.models.regnet 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 |
|