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 |
-
| FFNet-78S-LowRes | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 8.
|
| 40 |
-
| FFNet-78S-LowRes | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 8.
|
| 41 |
-
| FFNet-78S-LowRes | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX |
|
| 42 |
-
| FFNet-78S-LowRes | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 5.
|
| 43 |
-
| FFNet-78S-LowRes | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 5.
|
| 44 |
-
| FFNet-78S-LowRes | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 5.
|
| 45 |
-
| FFNet-78S-LowRes | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE |
|
| 46 |
-
| FFNet-78S-LowRes | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 4.
|
| 47 |
-
| FFNet-78S-LowRes | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 5.
|
| 48 |
-
| FFNet-78S-LowRes | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 8.
|
| 49 |
-
| FFNet-78S-LowRes | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 7.
|
| 50 |
-
| FFNet-78S-LowRes |
|
| 51 |
-
| FFNet-78S-LowRes |
|
| 52 |
-
| FFNet-78S-LowRes |
|
| 53 |
-
| FFNet-78S-LowRes |
|
| 54 |
-
| FFNet-78S-LowRes |
|
| 55 |
-
| FFNet-78S-LowRes |
|
| 56 |
-
| FFNet-78S-LowRes |
|
| 57 |
-
| FFNet-78S-LowRes |
|
| 58 |
-
| FFNet-78S-LowRes |
|
| 59 |
-
| FFNet-78S-LowRes |
|
| 60 |
-
| FFNet-78S-LowRes |
|
| 61 |
-
| FFNet-78S-LowRes |
|
|
|
|
|
|
|
| 62 |
|
| 63 |
|
| 64 |
|
|
@@ -124,7 +126,7 @@ FFNet-78S-LowRes
|
|
| 124 |
Device : Samsung Galaxy S23 (13)
|
| 125 |
Runtime : TFLITE
|
| 126 |
Estimated inference time (ms) : 8.3
|
| 127 |
-
Estimated peak memory usage (MB): [0,
|
| 128 |
Total # Ops : 149
|
| 129 |
Compute Unit(s) : NPU (149 ops)
|
| 130 |
```
|
|
@@ -145,13 +147,29 @@ in memory using the `jit.trace` and then call the `submit_compile_job` API.
|
|
| 145 |
import torch
|
| 146 |
|
| 147 |
import qai_hub as hub
|
| 148 |
-
from qai_hub_models.models.ffnet_78s_lowres import
|
| 149 |
|
| 150 |
# Load the model
|
|
|
|
| 151 |
|
| 152 |
# Device
|
| 153 |
device = hub.Device("Samsung Galaxy S23")
|
| 154 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 155 |
|
| 156 |
```
|
| 157 |
|
|
|
|
| 36 |
|
| 37 |
| Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
|
| 38 |
|---|---|---|---|---|---|---|---|---|
|
| 39 |
+
| FFNet-78S-LowRes | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 8.256 ms | 0 - 51 MB | FP16 | NPU | [FFNet-78S-LowRes.tflite](https://huggingface.co/qualcomm/FFNet-78S-LowRes/blob/main/FFNet-78S-LowRes.tflite) |
|
| 40 |
+
| FFNet-78S-LowRes | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 8.341 ms | 6 - 30 MB | FP16 | NPU | [FFNet-78S-LowRes.so](https://huggingface.co/qualcomm/FFNet-78S-LowRes/blob/main/FFNet-78S-LowRes.so) |
|
| 41 |
+
| FFNet-78S-LowRes | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 7.912 ms | 0 - 51 MB | FP16 | NPU | [FFNet-78S-LowRes.onnx](https://huggingface.co/qualcomm/FFNet-78S-LowRes/blob/main/FFNet-78S-LowRes.onnx) |
|
| 42 |
+
| FFNet-78S-LowRes | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 5.748 ms | 1 - 26 MB | FP16 | NPU | [FFNet-78S-LowRes.tflite](https://huggingface.co/qualcomm/FFNet-78S-LowRes/blob/main/FFNet-78S-LowRes.tflite) |
|
| 43 |
+
| FFNet-78S-LowRes | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 5.793 ms | 6 - 32 MB | FP16 | NPU | [FFNet-78S-LowRes.so](https://huggingface.co/qualcomm/FFNet-78S-LowRes/blob/main/FFNet-78S-LowRes.so) |
|
| 44 |
+
| FFNet-78S-LowRes | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 5.817 ms | 7 - 91 MB | FP16 | NPU | [FFNet-78S-LowRes.onnx](https://huggingface.co/qualcomm/FFNet-78S-LowRes/blob/main/FFNet-78S-LowRes.onnx) |
|
| 45 |
+
| FFNet-78S-LowRes | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 5.64 ms | 0 - 22 MB | FP16 | NPU | [FFNet-78S-LowRes.tflite](https://huggingface.co/qualcomm/FFNet-78S-LowRes/blob/main/FFNet-78S-LowRes.tflite) |
|
| 46 |
+
| FFNet-78S-LowRes | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 4.777 ms | 6 - 26 MB | FP16 | NPU | Use Export Script |
|
| 47 |
+
| FFNet-78S-LowRes | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 5.824 ms | 2 - 46 MB | FP16 | NPU | [FFNet-78S-LowRes.onnx](https://huggingface.co/qualcomm/FFNet-78S-LowRes/blob/main/FFNet-78S-LowRes.onnx) |
|
| 48 |
+
| FFNet-78S-LowRes | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 8.172 ms | 0 - 42 MB | FP16 | NPU | [FFNet-78S-LowRes.tflite](https://huggingface.co/qualcomm/FFNet-78S-LowRes/blob/main/FFNet-78S-LowRes.tflite) |
|
| 49 |
+
| FFNet-78S-LowRes | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 7.604 ms | 6 - 7 MB | FP16 | NPU | Use Export Script |
|
| 50 |
+
| FFNet-78S-LowRes | SA7255P ADP | SA7255P | TFLITE | 289.313 ms | 1 - 22 MB | FP16 | NPU | [FFNet-78S-LowRes.tflite](https://huggingface.co/qualcomm/FFNet-78S-LowRes/blob/main/FFNet-78S-LowRes.tflite) |
|
| 51 |
+
| FFNet-78S-LowRes | SA7255P ADP | SA7255P | QNN | 288.598 ms | 4 - 9 MB | FP16 | NPU | Use Export Script |
|
| 52 |
+
| FFNet-78S-LowRes | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 8.357 ms | 1 - 24 MB | FP16 | NPU | [FFNet-78S-LowRes.tflite](https://huggingface.co/qualcomm/FFNet-78S-LowRes/blob/main/FFNet-78S-LowRes.tflite) |
|
| 53 |
+
| FFNet-78S-LowRes | SA8255 (Proxy) | SA8255P Proxy | QNN | 7.706 ms | 6 - 7 MB | FP16 | NPU | Use Export Script |
|
| 54 |
+
| FFNet-78S-LowRes | SA8295P ADP | SA8295P | TFLITE | 13.989 ms | 1 - 17 MB | FP16 | NPU | [FFNet-78S-LowRes.tflite](https://huggingface.co/qualcomm/FFNet-78S-LowRes/blob/main/FFNet-78S-LowRes.tflite) |
|
| 55 |
+
| FFNet-78S-LowRes | SA8295P ADP | SA8295P | QNN | 13.538 ms | 0 - 6 MB | FP16 | NPU | Use Export Script |
|
| 56 |
+
| FFNet-78S-LowRes | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 8.152 ms | 0 - 62 MB | FP16 | NPU | [FFNet-78S-LowRes.tflite](https://huggingface.co/qualcomm/FFNet-78S-LowRes/blob/main/FFNet-78S-LowRes.tflite) |
|
| 57 |
+
| FFNet-78S-LowRes | SA8650 (Proxy) | SA8650P Proxy | QNN | 7.592 ms | 6 - 7 MB | FP16 | NPU | Use Export Script |
|
| 58 |
+
| FFNet-78S-LowRes | SA8775P ADP | SA8775P | TFLITE | 15.754 ms | 1 - 21 MB | FP16 | NPU | [FFNet-78S-LowRes.tflite](https://huggingface.co/qualcomm/FFNet-78S-LowRes/blob/main/FFNet-78S-LowRes.tflite) |
|
| 59 |
+
| FFNet-78S-LowRes | SA8775P ADP | SA8775P | QNN | 15.156 ms | 1 - 7 MB | FP16 | NPU | Use Export Script |
|
| 60 |
+
| FFNet-78S-LowRes | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 12.133 ms | 1 - 25 MB | FP16 | NPU | [FFNet-78S-LowRes.tflite](https://huggingface.co/qualcomm/FFNet-78S-LowRes/blob/main/FFNet-78S-LowRes.tflite) |
|
| 61 |
+
| FFNet-78S-LowRes | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 12.541 ms | 6 - 26 MB | FP16 | NPU | Use Export Script |
|
| 62 |
+
| FFNet-78S-LowRes | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 8.199 ms | 6 - 6 MB | FP16 | NPU | Use Export Script |
|
| 63 |
+
| FFNet-78S-LowRes | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 8.874 ms | 47 - 47 MB | FP16 | NPU | [FFNet-78S-LowRes.onnx](https://huggingface.co/qualcomm/FFNet-78S-LowRes/blob/main/FFNet-78S-LowRes.onnx) |
|
| 64 |
|
| 65 |
|
| 66 |
|
|
|
|
| 126 |
Device : Samsung Galaxy S23 (13)
|
| 127 |
Runtime : TFLITE
|
| 128 |
Estimated inference time (ms) : 8.3
|
| 129 |
+
Estimated peak memory usage (MB): [0, 51]
|
| 130 |
Total # Ops : 149
|
| 131 |
Compute Unit(s) : NPU (149 ops)
|
| 132 |
```
|
|
|
|
| 147 |
import torch
|
| 148 |
|
| 149 |
import qai_hub as hub
|
| 150 |
+
from qai_hub_models.models.ffnet_78s_lowres import Model
|
| 151 |
|
| 152 |
# Load the model
|
| 153 |
+
torch_model = Model.from_pretrained()
|
| 154 |
|
| 155 |
# Device
|
| 156 |
device = hub.Device("Samsung Galaxy S23")
|
| 157 |
|
| 158 |
+
# Trace model
|
| 159 |
+
input_shape = torch_model.get_input_spec()
|
| 160 |
+
sample_inputs = torch_model.sample_inputs()
|
| 161 |
+
|
| 162 |
+
pt_model = torch.jit.trace(torch_model, [torch.tensor(data[0]) for _, data in sample_inputs.items()])
|
| 163 |
+
|
| 164 |
+
# Compile model on a specific device
|
| 165 |
+
compile_job = hub.submit_compile_job(
|
| 166 |
+
model=pt_model,
|
| 167 |
+
device=device,
|
| 168 |
+
input_specs=torch_model.get_input_spec(),
|
| 169 |
+
)
|
| 170 |
+
|
| 171 |
+
# Get target model to run on-device
|
| 172 |
+
target_model = compile_job.get_target_model()
|
| 173 |
|
| 174 |
```
|
| 175 |
|