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 |
-
| Inception-v3 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 1.
|
| 39 |
-
| Inception-v3 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 1.
|
| 40 |
-
| Inception-v3 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 1.
|
| 41 |
-
| Inception-v3 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 0.
|
| 42 |
-
| Inception-v3 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 1.
|
| 43 |
-
| Inception-v3 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 1.
|
| 44 |
-
| Inception-v3 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 0.
|
| 45 |
-
| Inception-v3 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 1.
|
| 46 |
-
| Inception-v3 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 1.
|
| 47 |
-
| Inception-v3 | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 1.
|
| 48 |
-
| Inception-v3 | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 1.
|
| 49 |
-
| Inception-v3 |
|
| 50 |
-
| Inception-v3 |
|
| 51 |
-
| Inception-v3 |
|
| 52 |
-
| Inception-v3 |
|
| 53 |
-
| Inception-v3 |
|
| 54 |
-
| Inception-v3 |
|
| 55 |
-
| Inception-v3 |
|
| 56 |
-
| Inception-v3 |
|
| 57 |
-
| Inception-v3 |
|
| 58 |
-
| Inception-v3 | QCS8450 (Proxy) | QCS8450 Proxy |
|
| 59 |
-
| Inception-v3 |
|
| 60 |
-
| Inception-v3 | Snapdragon X Elite CRD | Snapdragon® X Elite |
|
|
|
|
| 61 |
|
| 62 |
|
| 63 |
|
|
@@ -122,7 +123,7 @@ Inception-v3
|
|
| 122 |
Device : Samsung Galaxy S23 (13)
|
| 123 |
Runtime : TFLITE
|
| 124 |
Estimated inference time (ms) : 1.3
|
| 125 |
-
Estimated peak memory usage (MB): [0,
|
| 126 |
Total # Ops : 129
|
| 127 |
Compute Unit(s) : NPU (129 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.inception_v3 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 |
+
| Inception-v3 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 1.329 ms | 0 - 191 MB | FP16 | NPU | [Inception-v3.tflite](https://huggingface.co/qualcomm/Inception-v3/blob/main/Inception-v3.tflite) |
|
| 39 |
+
| Inception-v3 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 1.407 ms | 0 - 141 MB | FP16 | NPU | [Inception-v3.so](https://huggingface.co/qualcomm/Inception-v3/blob/main/Inception-v3.so) |
|
| 40 |
+
| Inception-v3 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 1.745 ms | 0 - 563 MB | FP16 | NPU | [Inception-v3.onnx](https://huggingface.co/qualcomm/Inception-v3/blob/main/Inception-v3.onnx) |
|
| 41 |
+
| Inception-v3 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 0.993 ms | 0 - 19 MB | FP16 | NPU | [Inception-v3.tflite](https://huggingface.co/qualcomm/Inception-v3/blob/main/Inception-v3.tflite) |
|
| 42 |
+
| Inception-v3 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 1.052 ms | 0 - 19 MB | FP16 | NPU | [Inception-v3.so](https://huggingface.co/qualcomm/Inception-v3/blob/main/Inception-v3.so) |
|
| 43 |
+
| Inception-v3 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 1.283 ms | 0 - 57 MB | FP16 | NPU | [Inception-v3.onnx](https://huggingface.co/qualcomm/Inception-v3/blob/main/Inception-v3.onnx) |
|
| 44 |
+
| Inception-v3 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 0.845 ms | 0 - 16 MB | FP16 | NPU | [Inception-v3.tflite](https://huggingface.co/qualcomm/Inception-v3/blob/main/Inception-v3.tflite) |
|
| 45 |
+
| Inception-v3 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 1.003 ms | 0 - 15 MB | FP16 | NPU | Use Export Script |
|
| 46 |
+
| Inception-v3 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 1.261 ms | 0 - 25 MB | FP16 | NPU | [Inception-v3.onnx](https://huggingface.co/qualcomm/Inception-v3/blob/main/Inception-v3.onnx) |
|
| 47 |
+
| Inception-v3 | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 1.329 ms | 0 - 191 MB | FP16 | NPU | [Inception-v3.tflite](https://huggingface.co/qualcomm/Inception-v3/blob/main/Inception-v3.tflite) |
|
| 48 |
+
| Inception-v3 | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 1.45 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
|
| 49 |
+
| Inception-v3 | SA7255P ADP | SA7255P | TFLITE | 58.004 ms | 0 - 14 MB | FP16 | NPU | [Inception-v3.tflite](https://huggingface.co/qualcomm/Inception-v3/blob/main/Inception-v3.tflite) |
|
| 50 |
+
| Inception-v3 | SA7255P ADP | SA7255P | QNN | 58.269 ms | 1 - 6 MB | FP16 | NPU | Use Export Script |
|
| 51 |
+
| Inception-v3 | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 1.334 ms | 0 - 191 MB | FP16 | NPU | [Inception-v3.tflite](https://huggingface.co/qualcomm/Inception-v3/blob/main/Inception-v3.tflite) |
|
| 52 |
+
| Inception-v3 | SA8255 (Proxy) | SA8255P Proxy | QNN | 1.458 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
|
| 53 |
+
| Inception-v3 | SA8295P ADP | SA8295P | TFLITE | 2.558 ms | 0 - 14 MB | FP16 | NPU | [Inception-v3.tflite](https://huggingface.co/qualcomm/Inception-v3/blob/main/Inception-v3.tflite) |
|
| 54 |
+
| Inception-v3 | SA8295P ADP | SA8295P | QNN | 2.842 ms | 0 - 6 MB | FP16 | NPU | Use Export Script |
|
| 55 |
+
| Inception-v3 | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 1.335 ms | 0 - 191 MB | FP16 | NPU | [Inception-v3.tflite](https://huggingface.co/qualcomm/Inception-v3/blob/main/Inception-v3.tflite) |
|
| 56 |
+
| Inception-v3 | SA8650 (Proxy) | SA8650P Proxy | QNN | 1.471 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
|
| 57 |
+
| Inception-v3 | SA8775P ADP | SA8775P | QNN | 2.864 ms | 1 - 6 MB | FP16 | NPU | Use Export Script |
|
| 58 |
+
| Inception-v3 | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 2.155 ms | 0 - 22 MB | FP16 | NPU | [Inception-v3.tflite](https://huggingface.co/qualcomm/Inception-v3/blob/main/Inception-v3.tflite) |
|
| 59 |
+
| Inception-v3 | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 2.189 ms | 1 - 17 MB | FP16 | NPU | Use Export Script |
|
| 60 |
+
| Inception-v3 | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 1.487 ms | 1 - 1 MB | FP16 | NPU | Use Export Script |
|
| 61 |
+
| Inception-v3 | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 1.656 ms | 49 - 49 MB | FP16 | NPU | [Inception-v3.onnx](https://huggingface.co/qualcomm/Inception-v3/blob/main/Inception-v3.onnx) |
|
| 62 |
|
| 63 |
|
| 64 |
|
|
|
|
| 123 |
Device : Samsung Galaxy S23 (13)
|
| 124 |
Runtime : TFLITE
|
| 125 |
Estimated inference time (ms) : 1.3
|
| 126 |
+
Estimated peak memory usage (MB): [0, 191]
|
| 127 |
Total # Ops : 129
|
| 128 |
Compute Unit(s) : NPU (129 ops)
|
| 129 |
```
|
|
|
|
| 144 |
import torch
|
| 145 |
|
| 146 |
import qai_hub as hub
|
| 147 |
+
from qai_hub_models.models.inception_v3 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 |
|