Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
@@ -34,25 +34,27 @@ More details on model performance across various devices, can be found
|
|
34 |
|
35 |
| Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
|
36 |
|---|---|---|---|---|---|---|---|---|
|
37 |
-
| AOT-GAN | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE |
|
38 |
-
| AOT-GAN | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 153.
|
39 |
-
| AOT-GAN | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 112.
|
40 |
-
| AOT-GAN | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN |
|
41 |
-
| AOT-GAN | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 118.
|
42 |
-
| AOT-GAN | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 118.
|
43 |
-
| AOT-GAN | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE |
|
44 |
-
| AOT-GAN | QCS8550 (Proxy) | QCS8550 Proxy | QNN |
|
45 |
-
| AOT-GAN |
|
46 |
-
| AOT-GAN |
|
47 |
-
| AOT-GAN |
|
48 |
-
| AOT-GAN |
|
49 |
-
| AOT-GAN |
|
50 |
-
| AOT-GAN |
|
51 |
-
| AOT-GAN |
|
52 |
-
| AOT-GAN |
|
53 |
-
| AOT-GAN |
|
54 |
-
| AOT-GAN |
|
55 |
-
| AOT-GAN |
|
|
|
|
|
56 |
|
57 |
|
58 |
|
@@ -116,8 +118,8 @@ Profiling Results
|
|
116 |
AOT-GAN
|
117 |
Device : Samsung Galaxy S23 (13)
|
118 |
Runtime : TFLITE
|
119 |
-
Estimated inference time (ms) :
|
120 |
-
Estimated peak memory usage (MB): [3,
|
121 |
Total # Ops : 235
|
122 |
Compute Unit(s) : NPU (235 ops)
|
123 |
```
|
@@ -138,13 +140,29 @@ in memory using the `jit.trace` and then call the `submit_compile_job` API.
|
|
138 |
import torch
|
139 |
|
140 |
import qai_hub as hub
|
141 |
-
from qai_hub_models.models.aotgan import
|
142 |
|
143 |
# Load the model
|
|
|
144 |
|
145 |
# Device
|
146 |
device = hub.Device("Samsung Galaxy S23")
|
147 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
148 |
|
149 |
```
|
150 |
|
|
|
34 |
|
35 |
| Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
|
36 |
|---|---|---|---|---|---|---|---|---|
|
37 |
+
| AOT-GAN | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 153.257 ms | 3 - 36 MB | FP16 | NPU | [AOT-GAN.tflite](https://huggingface.co/qualcomm/AOT-GAN/blob/main/AOT-GAN.tflite) |
|
38 |
+
| AOT-GAN | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 153.759 ms | 0 - 36 MB | FP16 | NPU | [AOT-GAN.so](https://huggingface.co/qualcomm/AOT-GAN/blob/main/AOT-GAN.so) |
|
39 |
+
| AOT-GAN | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 112.139 ms | 1 - 61 MB | FP16 | NPU | [AOT-GAN.tflite](https://huggingface.co/qualcomm/AOT-GAN/blob/main/AOT-GAN.tflite) |
|
40 |
+
| AOT-GAN | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 111.92 ms | 3 - 61 MB | FP16 | NPU | [AOT-GAN.so](https://huggingface.co/qualcomm/AOT-GAN/blob/main/AOT-GAN.so) |
|
41 |
+
| AOT-GAN | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 118.38 ms | 3 - 65 MB | FP16 | NPU | [AOT-GAN.tflite](https://huggingface.co/qualcomm/AOT-GAN/blob/main/AOT-GAN.tflite) |
|
42 |
+
| AOT-GAN | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 118.426 ms | 4 - 66 MB | FP16 | NPU | Use Export Script |
|
43 |
+
| AOT-GAN | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 153.157 ms | 3 - 30 MB | FP16 | NPU | [AOT-GAN.tflite](https://huggingface.co/qualcomm/AOT-GAN/blob/main/AOT-GAN.tflite) |
|
44 |
+
| AOT-GAN | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 102.102 ms | 4 - 5 MB | FP16 | NPU | Use Export Script |
|
45 |
+
| AOT-GAN | SA7255P ADP | SA7255P | TFLITE | 3625.285 ms | 3 - 64 MB | FP16 | NPU | [AOT-GAN.tflite](https://huggingface.co/qualcomm/AOT-GAN/blob/main/AOT-GAN.tflite) |
|
46 |
+
| AOT-GAN | SA7255P ADP | SA7255P | QNN | 3580.513 ms | 3 - 10 MB | FP16 | NPU | Use Export Script |
|
47 |
+
| AOT-GAN | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 153.372 ms | 3 - 31 MB | FP16 | NPU | [AOT-GAN.tflite](https://huggingface.co/qualcomm/AOT-GAN/blob/main/AOT-GAN.tflite) |
|
48 |
+
| AOT-GAN | SA8255 (Proxy) | SA8255P Proxy | QNN | 102.12 ms | 4 - 5 MB | FP16 | NPU | Use Export Script |
|
49 |
+
| AOT-GAN | SA8295P ADP | SA8295P | TFLITE | 219.091 ms | 3 - 51 MB | FP16 | NPU | [AOT-GAN.tflite](https://huggingface.co/qualcomm/AOT-GAN/blob/main/AOT-GAN.tflite) |
|
50 |
+
| AOT-GAN | SA8295P ADP | SA8295P | QNN | 164.549 ms | 1 - 7 MB | FP16 | NPU | Use Export Script |
|
51 |
+
| AOT-GAN | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 153.38 ms | 3 - 34 MB | FP16 | NPU | [AOT-GAN.tflite](https://huggingface.co/qualcomm/AOT-GAN/blob/main/AOT-GAN.tflite) |
|
52 |
+
| AOT-GAN | SA8650 (Proxy) | SA8650P Proxy | QNN | 101.825 ms | 3 - 6 MB | FP16 | NPU | Use Export Script |
|
53 |
+
| AOT-GAN | SA8775P ADP | SA8775P | TFLITE | 241.89 ms | 3 - 64 MB | FP16 | NPU | [AOT-GAN.tflite](https://huggingface.co/qualcomm/AOT-GAN/blob/main/AOT-GAN.tflite) |
|
54 |
+
| AOT-GAN | SA8775P ADP | SA8775P | QNN | 181.587 ms | 3 - 9 MB | FP16 | NPU | Use Export Script |
|
55 |
+
| AOT-GAN | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 196.585 ms | 3 - 53 MB | FP16 | NPU | [AOT-GAN.tflite](https://huggingface.co/qualcomm/AOT-GAN/blob/main/AOT-GAN.tflite) |
|
56 |
+
| AOT-GAN | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 196.144 ms | 4 - 53 MB | FP16 | NPU | Use Export Script |
|
57 |
+
| AOT-GAN | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 110.93 ms | 4 - 4 MB | FP16 | NPU | Use Export Script |
|
58 |
|
59 |
|
60 |
|
|
|
118 |
AOT-GAN
|
119 |
Device : Samsung Galaxy S23 (13)
|
120 |
Runtime : TFLITE
|
121 |
+
Estimated inference time (ms) : 153.3
|
122 |
+
Estimated peak memory usage (MB): [3, 36]
|
123 |
Total # Ops : 235
|
124 |
Compute Unit(s) : NPU (235 ops)
|
125 |
```
|
|
|
140 |
import torch
|
141 |
|
142 |
import qai_hub as hub
|
143 |
+
from qai_hub_models.models.aotgan import Model
|
144 |
|
145 |
# Load the model
|
146 |
+
torch_model = Model.from_pretrained()
|
147 |
|
148 |
# Device
|
149 |
device = hub.Device("Samsung Galaxy S23")
|
150 |
|
151 |
+
# Trace model
|
152 |
+
input_shape = torch_model.get_input_spec()
|
153 |
+
sample_inputs = torch_model.sample_inputs()
|
154 |
+
|
155 |
+
pt_model = torch.jit.trace(torch_model, [torch.tensor(data[0]) for _, data in sample_inputs.items()])
|
156 |
+
|
157 |
+
# Compile model on a specific device
|
158 |
+
compile_job = hub.submit_compile_job(
|
159 |
+
model=pt_model,
|
160 |
+
device=device,
|
161 |
+
input_specs=torch_model.get_input_spec(),
|
162 |
+
)
|
163 |
+
|
164 |
+
# Get target model to run on-device
|
165 |
+
target_model = compile_job.get_target_model()
|
166 |
|
167 |
```
|
168 |
|