bhushans commited on
Commit
3a4fc0a
1 Parent(s): bfbb3d3

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +43 -25
README.md CHANGED
@@ -34,29 +34,31 @@ 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
- | ESRGAN | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 65.917 ms | 3 - 6 MB | FP16 | NPU | [ESRGAN.tflite](https://huggingface.co/qualcomm/ESRGAN/blob/main/ESRGAN.tflite) |
38
- | ESRGAN | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 70.267 ms | 0 - 215 MB | FP16 | NPU | [ESRGAN.so](https://huggingface.co/qualcomm/ESRGAN/blob/main/ESRGAN.so) |
39
- | ESRGAN | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 71.498 ms | 0 - 42 MB | FP16 | NPU | [ESRGAN.onnx](https://huggingface.co/qualcomm/ESRGAN/blob/main/ESRGAN.onnx) |
40
  | ESRGAN | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 48.914 ms | 3 - 662 MB | FP16 | NPU | [ESRGAN.tflite](https://huggingface.co/qualcomm/ESRGAN/blob/main/ESRGAN.tflite) |
41
- | ESRGAN | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 50.782 ms | 0 - 108 MB | FP16 | NPU | [ESRGAN.so](https://huggingface.co/qualcomm/ESRGAN/blob/main/ESRGAN.so) |
42
- | ESRGAN | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 52.531 ms | 6 - 696 MB | FP16 | NPU | [ESRGAN.onnx](https://huggingface.co/qualcomm/ESRGAN/blob/main/ESRGAN.onnx) |
43
- | ESRGAN | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 37.71 ms | 3 - 183 MB | FP16 | NPU | [ESRGAN.tflite](https://huggingface.co/qualcomm/ESRGAN/blob/main/ESRGAN.tflite) |
44
- | ESRGAN | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 42.47 ms | 0 - 128 MB | FP16 | NPU | Use Export Script |
45
- | ESRGAN | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 43.058 ms | 6 - 183 MB | FP16 | NPU | [ESRGAN.onnx](https://huggingface.co/qualcomm/ESRGAN/blob/main/ESRGAN.onnx) |
46
- | ESRGAN | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 63.196 ms | 3 - 6 MB | FP16 | NPU | [ESRGAN.tflite](https://huggingface.co/qualcomm/ESRGAN/blob/main/ESRGAN.tflite) |
47
- | ESRGAN | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 64.385 ms | 0 - 2 MB | FP16 | NPU | Use Export Script |
48
- | ESRGAN | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 67.89 ms | 3 - 5 MB | FP16 | NPU | [ESRGAN.tflite](https://huggingface.co/qualcomm/ESRGAN/blob/main/ESRGAN.tflite) |
49
- | ESRGAN | SA8255 (Proxy) | SA8255P Proxy | QNN | 62.524 ms | 0 - 2 MB | FP16 | NPU | Use Export Script |
50
- | ESRGAN | SA8775 (Proxy) | SA8775P Proxy | TFLITE | 71.251 ms | 3 - 6 MB | FP16 | NPU | [ESRGAN.tflite](https://huggingface.co/qualcomm/ESRGAN/blob/main/ESRGAN.tflite) |
51
- | ESRGAN | SA8775 (Proxy) | SA8775P Proxy | QNN | 63.428 ms | 0 - 1 MB | FP16 | NPU | Use Export Script |
52
- | ESRGAN | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 65.346 ms | 3 - 5 MB | FP16 | NPU | [ESRGAN.tflite](https://huggingface.co/qualcomm/ESRGAN/blob/main/ESRGAN.tflite) |
53
- | ESRGAN | SA8650 (Proxy) | SA8650P Proxy | QNN | 63.333 ms | 0 - 2 MB | FP16 | NPU | Use Export Script |
54
- | ESRGAN | SA8295P ADP | SA8295P | TFLITE | 112.057 ms | 3 - 170 MB | FP16 | NPU | [ESRGAN.tflite](https://huggingface.co/qualcomm/ESRGAN/blob/main/ESRGAN.tflite) |
55
- | ESRGAN | SA8295P ADP | SA8295P | QNN | 111.03 ms | 0 - 6 MB | FP16 | NPU | Use Export Script |
56
- | ESRGAN | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 157.613 ms | 0 - 618 MB | FP16 | NPU | [ESRGAN.tflite](https://huggingface.co/qualcomm/ESRGAN/blob/main/ESRGAN.tflite) |
57
- | ESRGAN | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 128.296 ms | 0 - 85 MB | FP16 | NPU | Use Export Script |
58
- | ESRGAN | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 64.877 ms | 0 - 0 MB | FP16 | NPU | Use Export Script |
59
- | ESRGAN | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 65.632 ms | 39 - 39 MB | FP16 | NPU | [ESRGAN.onnx](https://huggingface.co/qualcomm/ESRGAN/blob/main/ESRGAN.onnx) |
 
 
60
 
61
 
62
 
@@ -120,8 +122,8 @@ Profiling Results
120
  ESRGAN
121
  Device : Samsung Galaxy S23 (13)
122
  Runtime : TFLITE
123
- Estimated inference time (ms) : 65.9
124
- Estimated peak memory usage (MB): [3, 6]
125
  Total # Ops : 1024
126
  Compute Unit(s) : NPU (1024 ops)
127
  ```
@@ -142,13 +144,29 @@ in memory using the `jit.trace` and then call the `submit_compile_job` API.
142
  import torch
143
 
144
  import qai_hub as hub
145
- from qai_hub_models.models.esrgan import
146
 
147
  # Load the model
 
148
 
149
  # Device
150
  device = hub.Device("Samsung Galaxy S23")
151
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
152
 
153
  ```
154
 
 
34
 
35
  | Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
36
  |---|---|---|---|---|---|---|---|---|
37
+ | ESRGAN | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 69.024 ms | 3 - 41 MB | FP16 | NPU | [ESRGAN.tflite](https://huggingface.co/qualcomm/ESRGAN/blob/main/ESRGAN.tflite) |
38
+ | ESRGAN | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 66.742 ms | 0 - 38 MB | FP16 | NPU | [ESRGAN.so](https://huggingface.co/qualcomm/ESRGAN/blob/main/ESRGAN.so) |
39
+ | ESRGAN | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 71.631 ms | 0 - 42 MB | FP16 | NPU | [ESRGAN.onnx](https://huggingface.co/qualcomm/ESRGAN/blob/main/ESRGAN.onnx) |
40
  | ESRGAN | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 48.914 ms | 3 - 662 MB | FP16 | NPU | [ESRGAN.tflite](https://huggingface.co/qualcomm/ESRGAN/blob/main/ESRGAN.tflite) |
41
+ | ESRGAN | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 50.107 ms | 0 - 107 MB | FP16 | NPU | [ESRGAN.so](https://huggingface.co/qualcomm/ESRGAN/blob/main/ESRGAN.so) |
42
+ | ESRGAN | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 49.647 ms | 7 - 697 MB | FP16 | NPU | [ESRGAN.onnx](https://huggingface.co/qualcomm/ESRGAN/blob/main/ESRGAN.onnx) |
43
+ | ESRGAN | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 37.457 ms | 3 - 134 MB | FP16 | NPU | [ESRGAN.tflite](https://huggingface.co/qualcomm/ESRGAN/blob/main/ESRGAN.tflite) |
44
+ | ESRGAN | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 42.368 ms | 0 - 130 MB | FP16 | NPU | Use Export Script |
45
+ | ESRGAN | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 43.233 ms | 0 - 178 MB | FP16 | NPU | [ESRGAN.onnx](https://huggingface.co/qualcomm/ESRGAN/blob/main/ESRGAN.onnx) |
46
+ | ESRGAN | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 69.792 ms | 3 - 43 MB | FP16 | NPU | [ESRGAN.tflite](https://huggingface.co/qualcomm/ESRGAN/blob/main/ESRGAN.tflite) |
47
+ | ESRGAN | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 63.641 ms | 0 - 2 MB | FP16 | NPU | Use Export Script |
48
+ | ESRGAN | SA7255P ADP | SA7255P | TFLITE | 3548.908 ms | 0 - 131 MB | FP16 | NPU | [ESRGAN.tflite](https://huggingface.co/qualcomm/ESRGAN/blob/main/ESRGAN.tflite) |
49
+ | ESRGAN | SA7255P ADP | SA7255P | QNN | 3549.141 ms | 1 - 6 MB | FP16 | NPU | Use Export Script |
50
+ | ESRGAN | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 69.9 ms | 0 - 220 MB | FP16 | NPU | [ESRGAN.tflite](https://huggingface.co/qualcomm/ESRGAN/blob/main/ESRGAN.tflite) |
51
+ | ESRGAN | SA8255 (Proxy) | SA8255P Proxy | QNN | 63.964 ms | 0 - 2 MB | FP16 | NPU | Use Export Script |
52
+ | ESRGAN | SA8295P ADP | SA8295P | TFLITE | 112.147 ms | 3 - 126 MB | FP16 | NPU | [ESRGAN.tflite](https://huggingface.co/qualcomm/ESRGAN/blob/main/ESRGAN.tflite) |
53
+ | ESRGAN | SA8295P ADP | SA8295P | QNN | 111.111 ms | 0 - 6 MB | FP16 | NPU | Use Export Script |
54
+ | ESRGAN | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 66.467 ms | 0 - 117 MB | FP16 | NPU | [ESRGAN.tflite](https://huggingface.co/qualcomm/ESRGAN/blob/main/ESRGAN.tflite) |
55
+ | ESRGAN | SA8650 (Proxy) | SA8650P Proxy | QNN | 63.164 ms | 0 - 2 MB | FP16 | NPU | Use Export Script |
56
+ | ESRGAN | SA8775P ADP | SA8775P | TFLITE | 131.599 ms | 3 - 136 MB | FP16 | NPU | [ESRGAN.tflite](https://huggingface.co/qualcomm/ESRGAN/blob/main/ESRGAN.tflite) |
57
+ | ESRGAN | SA8775P ADP | SA8775P | QNN | 131.068 ms | 0 - 6 MB | FP16 | NPU | Use Export Script |
58
+ | ESRGAN | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 133.506 ms | 3 - 106 MB | FP16 | NPU | [ESRGAN.tflite](https://huggingface.co/qualcomm/ESRGAN/blob/main/ESRGAN.tflite) |
59
+ | ESRGAN | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 128.638 ms | 0 - 87 MB | FP16 | NPU | Use Export Script |
60
+ | ESRGAN | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 64.855 ms | 0 - 0 MB | FP16 | NPU | Use Export Script |
61
+ | ESRGAN | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 65.698 ms | 38 - 38 MB | FP16 | NPU | [ESRGAN.onnx](https://huggingface.co/qualcomm/ESRGAN/blob/main/ESRGAN.onnx) |
62
 
63
 
64
 
 
122
  ESRGAN
123
  Device : Samsung Galaxy S23 (13)
124
  Runtime : TFLITE
125
+ Estimated inference time (ms) : 69.0
126
+ Estimated peak memory usage (MB): [3, 41]
127
  Total # Ops : 1024
128
  Compute Unit(s) : NPU (1024 ops)
129
  ```
 
144
  import torch
145
 
146
  import qai_hub as hub
147
+ from qai_hub_models.models.esrgan 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