Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -36,29 +36,31 @@ 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 |
-
| MobileNet-v3-Large | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 0.
|
| 40 |
-
| MobileNet-v3-Large | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 1.
|
| 41 |
-
| MobileNet-v3-Large | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX |
|
| 42 |
-
| MobileNet-v3-Large | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 0.
|
| 43 |
-
| MobileNet-v3-Large | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 0.
|
| 44 |
-
| MobileNet-v3-Large | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 0.
|
| 45 |
-
| MobileNet-v3-Large | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 0.678 ms | 0 -
|
| 46 |
-
| MobileNet-v3-Large | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 0.
|
| 47 |
-
| MobileNet-v3-Large | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 0.
|
| 48 |
-
| MobileNet-v3-Large | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 0.
|
| 49 |
-
| MobileNet-v3-Large | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 1.
|
| 50 |
-
| MobileNet-v3-Large |
|
| 51 |
-
| MobileNet-v3-Large |
|
| 52 |
-
| MobileNet-v3-Large |
|
| 53 |
-
| MobileNet-v3-Large |
|
| 54 |
-
| MobileNet-v3-Large |
|
| 55 |
-
| MobileNet-v3-Large |
|
| 56 |
-
| MobileNet-v3-Large |
|
| 57 |
-
| MobileNet-v3-Large |
|
| 58 |
-
| MobileNet-v3-Large |
|
| 59 |
-
| MobileNet-v3-Large |
|
| 60 |
-
| MobileNet-v3-Large |
|
| 61 |
-
| MobileNet-v3-Large |
|
|
|
|
|
|
|
| 62 |
|
| 63 |
|
| 64 |
|
|
@@ -123,7 +125,7 @@ MobileNet-v3-Large
|
|
| 123 |
Device : Samsung Galaxy S23 (13)
|
| 124 |
Runtime : TFLITE
|
| 125 |
Estimated inference time (ms) : 1.0
|
| 126 |
-
Estimated peak memory usage (MB): [0,
|
| 127 |
Total # Ops : 128
|
| 128 |
Compute Unit(s) : NPU (128 ops)
|
| 129 |
```
|
|
@@ -144,13 +146,29 @@ in memory using the `jit.trace` and then call the `submit_compile_job` API.
|
|
| 144 |
import torch
|
| 145 |
|
| 146 |
import qai_hub as hub
|
| 147 |
-
from qai_hub_models.models.mobilenet_v3_large import
|
| 148 |
|
| 149 |
# Load the model
|
|
|
|
| 150 |
|
| 151 |
# Device
|
| 152 |
device = hub.Device("Samsung Galaxy S23")
|
| 153 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 154 |
|
| 155 |
```
|
| 156 |
|
|
|
|
| 36 |
|
| 37 |
| Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
|
| 38 |
|---|---|---|---|---|---|---|---|---|
|
| 39 |
+
| MobileNet-v3-Large | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 0.996 ms | 0 - 5 MB | FP16 | NPU | [MobileNet-v3-Large.tflite](https://huggingface.co/qualcomm/MobileNet-v3-Large/blob/main/MobileNet-v3-Large.tflite) |
|
| 40 |
+
| MobileNet-v3-Large | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 1.035 ms | 0 - 54 MB | FP16 | NPU | [MobileNet-v3-Large.so](https://huggingface.co/qualcomm/MobileNet-v3-Large/blob/main/MobileNet-v3-Large.so) |
|
| 41 |
+
| MobileNet-v3-Large | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 0.993 ms | 1 - 151 MB | FP16 | NPU | [MobileNet-v3-Large.onnx](https://huggingface.co/qualcomm/MobileNet-v3-Large/blob/main/MobileNet-v3-Large.onnx) |
|
| 42 |
+
| MobileNet-v3-Large | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 0.672 ms | 0 - 16 MB | FP16 | NPU | [MobileNet-v3-Large.tflite](https://huggingface.co/qualcomm/MobileNet-v3-Large/blob/main/MobileNet-v3-Large.tflite) |
|
| 43 |
+
| MobileNet-v3-Large | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 0.721 ms | 0 - 19 MB | FP16 | NPU | [MobileNet-v3-Large.so](https://huggingface.co/qualcomm/MobileNet-v3-Large/blob/main/MobileNet-v3-Large.so) |
|
| 44 |
+
| MobileNet-v3-Large | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 0.716 ms | 0 - 69 MB | FP16 | NPU | [MobileNet-v3-Large.onnx](https://huggingface.co/qualcomm/MobileNet-v3-Large/blob/main/MobileNet-v3-Large.onnx) |
|
| 45 |
+
| MobileNet-v3-Large | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 0.678 ms | 0 - 15 MB | FP16 | NPU | [MobileNet-v3-Large.tflite](https://huggingface.co/qualcomm/MobileNet-v3-Large/blob/main/MobileNet-v3-Large.tflite) |
|
| 46 |
+
| MobileNet-v3-Large | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 0.717 ms | 0 - 14 MB | FP16 | NPU | Use Export Script |
|
| 47 |
+
| MobileNet-v3-Large | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 0.733 ms | 0 - 27 MB | FP16 | NPU | [MobileNet-v3-Large.onnx](https://huggingface.co/qualcomm/MobileNet-v3-Large/blob/main/MobileNet-v3-Large.onnx) |
|
| 48 |
+
| MobileNet-v3-Large | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 0.991 ms | 0 - 74 MB | FP16 | NPU | [MobileNet-v3-Large.tflite](https://huggingface.co/qualcomm/MobileNet-v3-Large/blob/main/MobileNet-v3-Large.tflite) |
|
| 49 |
+
| MobileNet-v3-Large | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 1.002 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
|
| 50 |
+
| MobileNet-v3-Large | SA7255P ADP | SA7255P | TFLITE | 15.166 ms | 0 - 13 MB | FP16 | NPU | [MobileNet-v3-Large.tflite](https://huggingface.co/qualcomm/MobileNet-v3-Large/blob/main/MobileNet-v3-Large.tflite) |
|
| 51 |
+
| MobileNet-v3-Large | SA7255P ADP | SA7255P | QNN | 14.806 ms | 1 - 6 MB | FP16 | NPU | Use Export Script |
|
| 52 |
+
| MobileNet-v3-Large | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 0.993 ms | 0 - 75 MB | FP16 | NPU | [MobileNet-v3-Large.tflite](https://huggingface.co/qualcomm/MobileNet-v3-Large/blob/main/MobileNet-v3-Large.tflite) |
|
| 53 |
+
| MobileNet-v3-Large | SA8255 (Proxy) | SA8255P Proxy | QNN | 0.999 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
|
| 54 |
+
| MobileNet-v3-Large | SA8295P ADP | SA8295P | TFLITE | 1.839 ms | 0 - 13 MB | FP16 | NPU | [MobileNet-v3-Large.tflite](https://huggingface.co/qualcomm/MobileNet-v3-Large/blob/main/MobileNet-v3-Large.tflite) |
|
| 55 |
+
| MobileNet-v3-Large | SA8295P ADP | SA8295P | QNN | 1.906 ms | 0 - 6 MB | FP16 | NPU | Use Export Script |
|
| 56 |
+
| MobileNet-v3-Large | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 0.993 ms | 0 - 5 MB | FP16 | NPU | [MobileNet-v3-Large.tflite](https://huggingface.co/qualcomm/MobileNet-v3-Large/blob/main/MobileNet-v3-Large.tflite) |
|
| 57 |
+
| MobileNet-v3-Large | SA8650 (Proxy) | SA8650P Proxy | QNN | 0.998 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
|
| 58 |
+
| MobileNet-v3-Large | SA8775P ADP | SA8775P | TFLITE | 1.69 ms | 0 - 15 MB | FP16 | NPU | [MobileNet-v3-Large.tflite](https://huggingface.co/qualcomm/MobileNet-v3-Large/blob/main/MobileNet-v3-Large.tflite) |
|
| 59 |
+
| MobileNet-v3-Large | SA8775P ADP | SA8775P | QNN | 1.829 ms | 1 - 6 MB | FP16 | NPU | Use Export Script |
|
| 60 |
+
| MobileNet-v3-Large | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 1.393 ms | 0 - 18 MB | FP16 | NPU | [MobileNet-v3-Large.tflite](https://huggingface.co/qualcomm/MobileNet-v3-Large/blob/main/MobileNet-v3-Large.tflite) |
|
| 61 |
+
| MobileNet-v3-Large | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 1.454 ms | 1 - 21 MB | FP16 | NPU | Use Export Script |
|
| 62 |
+
| MobileNet-v3-Large | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 1.138 ms | 1 - 1 MB | FP16 | NPU | Use Export Script |
|
| 63 |
+
| MobileNet-v3-Large | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 1.048 ms | 13 - 13 MB | FP16 | NPU | [MobileNet-v3-Large.onnx](https://huggingface.co/qualcomm/MobileNet-v3-Large/blob/main/MobileNet-v3-Large.onnx) |
|
| 64 |
|
| 65 |
|
| 66 |
|
|
|
|
| 125 |
Device : Samsung Galaxy S23 (13)
|
| 126 |
Runtime : TFLITE
|
| 127 |
Estimated inference time (ms) : 1.0
|
| 128 |
+
Estimated peak memory usage (MB): [0, 5]
|
| 129 |
Total # Ops : 128
|
| 130 |
Compute Unit(s) : NPU (128 ops)
|
| 131 |
```
|
|
|
|
| 146 |
import torch
|
| 147 |
|
| 148 |
import qai_hub as hub
|
| 149 |
+
from qai_hub_models.models.mobilenet_v3_large import Model
|
| 150 |
|
| 151 |
# Load the model
|
| 152 |
+
torch_model = Model.from_pretrained()
|
| 153 |
|
| 154 |
# Device
|
| 155 |
device = hub.Device("Samsung Galaxy S23")
|
| 156 |
|
| 157 |
+
# Trace model
|
| 158 |
+
input_shape = torch_model.get_input_spec()
|
| 159 |
+
sample_inputs = torch_model.sample_inputs()
|
| 160 |
+
|
| 161 |
+
pt_model = torch.jit.trace(torch_model, [torch.tensor(data[0]) for _, data in sample_inputs.items()])
|
| 162 |
+
|
| 163 |
+
# Compile model on a specific device
|
| 164 |
+
compile_job = hub.submit_compile_job(
|
| 165 |
+
model=pt_model,
|
| 166 |
+
device=device,
|
| 167 |
+
input_specs=torch_model.get_input_spec(),
|
| 168 |
+
)
|
| 169 |
+
|
| 170 |
+
# Get target model to run on-device
|
| 171 |
+
target_model = compile_job.get_target_model()
|
| 172 |
|
| 173 |
```
|
| 174 |
|