bhushans commited on
Commit
d836e47
·
verified ·
1 Parent(s): e04f040

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +45 -28
README.md CHANGED
@@ -35,32 +35,33 @@ 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
- | QuickSRNetSmall-Quantized | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 1.074 ms | 0 - 3 MB | INT8 | NPU | [QuickSRNetSmall-Quantized.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall-Quantized/blob/main/QuickSRNetSmall-Quantized.tflite) |
39
- | QuickSRNetSmall-Quantized | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 0.502 ms | 0 - 10 MB | INT8 | NPU | [QuickSRNetSmall-Quantized.so](https://huggingface.co/qualcomm/QuickSRNetSmall-Quantized/blob/main/QuickSRNetSmall-Quantized.so) |
40
- | QuickSRNetSmall-Quantized | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 3.581 ms | 0 - 2 MB | INT8 | NPU | [QuickSRNetSmall-Quantized.onnx](https://huggingface.co/qualcomm/QuickSRNetSmall-Quantized/blob/main/QuickSRNetSmall-Quantized.onnx) |
41
- | QuickSRNetSmall-Quantized | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 0.865 ms | 0 - 21 MB | INT8 | NPU | [QuickSRNetSmall-Quantized.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall-Quantized/blob/main/QuickSRNetSmall-Quantized.tflite) |
42
- | QuickSRNetSmall-Quantized | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 0.325 ms | 0 - 10 MB | INT8 | NPU | [QuickSRNetSmall-Quantized.so](https://huggingface.co/qualcomm/QuickSRNetSmall-Quantized/blob/main/QuickSRNetSmall-Quantized.so) |
43
- | QuickSRNetSmall-Quantized | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 2.715 ms | 0 - 29 MB | INT8 | NPU | [QuickSRNetSmall-Quantized.onnx](https://huggingface.co/qualcomm/QuickSRNetSmall-Quantized/blob/main/QuickSRNetSmall-Quantized.onnx) |
44
- | QuickSRNetSmall-Quantized | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 0.828 ms | 0 - 14 MB | INT8 | NPU | [QuickSRNetSmall-Quantized.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall-Quantized/blob/main/QuickSRNetSmall-Quantized.tflite) |
45
- | QuickSRNetSmall-Quantized | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 0.282 ms | 0 - 9 MB | INT8 | NPU | Use Export Script |
46
- | QuickSRNetSmall-Quantized | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 2.618 ms | 0 - 18 MB | INT8 | NPU | [QuickSRNetSmall-Quantized.onnx](https://huggingface.co/qualcomm/QuickSRNetSmall-Quantized/blob/main/QuickSRNetSmall-Quantized.onnx) |
47
- | QuickSRNetSmall-Quantized | RB3 Gen 2 (Proxy) | QCS6490 Proxy | TFLITE | 2.109 ms | 0 - 15 MB | INT8 | NPU | [QuickSRNetSmall-Quantized.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall-Quantized/blob/main/QuickSRNetSmall-Quantized.tflite) |
48
- | QuickSRNetSmall-Quantized | RB3 Gen 2 (Proxy) | QCS6490 Proxy | QNN | 1.096 ms | 0 - 8 MB | INT8 | NPU | Use Export Script |
49
- | QuickSRNetSmall-Quantized | RB5 (Proxy) | QCS8250 Proxy | TFLITE | 11.377 ms | 2 - 5 MB | INT8 | NPU | [QuickSRNetSmall-Quantized.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall-Quantized/blob/main/QuickSRNetSmall-Quantized.tflite) |
50
- | QuickSRNetSmall-Quantized | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 1.058 ms | 0 - 1 MB | INT8 | NPU | [QuickSRNetSmall-Quantized.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall-Quantized/blob/main/QuickSRNetSmall-Quantized.tflite) |
51
- | QuickSRNetSmall-Quantized | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 0.392 ms | 0 - 1 MB | INT8 | NPU | Use Export Script |
52
- | QuickSRNetSmall-Quantized | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 1.064 ms | 0 - 1 MB | INT8 | NPU | [QuickSRNetSmall-Quantized.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall-Quantized/blob/main/QuickSRNetSmall-Quantized.tflite) |
53
- | QuickSRNetSmall-Quantized | SA8255 (Proxy) | SA8255P Proxy | QNN | 0.388 ms | 0 - 1 MB | INT8 | NPU | Use Export Script |
54
- | QuickSRNetSmall-Quantized | SA8775 (Proxy) | SA8775P Proxy | TFLITE | 1.082 ms | 0 - 3 MB | INT8 | NPU | [QuickSRNetSmall-Quantized.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall-Quantized/blob/main/QuickSRNetSmall-Quantized.tflite) |
55
- | QuickSRNetSmall-Quantized | SA8775 (Proxy) | SA8775P Proxy | QNN | 0.391 ms | 0 - 2 MB | INT8 | NPU | Use Export Script |
56
- | QuickSRNetSmall-Quantized | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 2.623 ms | 1 - 32 MB | INT8 | NPU | [QuickSRNetSmall-Quantized.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall-Quantized/blob/main/QuickSRNetSmall-Quantized.tflite) |
57
- | QuickSRNetSmall-Quantized | SA8650 (Proxy) | SA8650P Proxy | QNN | 0.42 ms | 0 - 1 MB | INT8 | NPU | Use Export Script |
58
- | QuickSRNetSmall-Quantized | SA8295P ADP | SA8295P | TFLITE | 1.802 ms | 2 - 14 MB | INT8 | NPU | [QuickSRNetSmall-Quantized.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall-Quantized/blob/main/QuickSRNetSmall-Quantized.tflite) |
59
- | QuickSRNetSmall-Quantized | SA8295P ADP | SA8295P | QNN | 0.896 ms | 0 - 5 MB | INT8 | NPU | Use Export Script |
60
- | QuickSRNetSmall-Quantized | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 1.909 ms | 2 - 23 MB | INT8 | NPU | [QuickSRNetSmall-Quantized.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall-Quantized/blob/main/QuickSRNetSmall-Quantized.tflite) |
61
- | QuickSRNetSmall-Quantized | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 0.537 ms | 0 - 11 MB | INT8 | NPU | Use Export Script |
62
- | QuickSRNetSmall-Quantized | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 0.487 ms | 0 - 0 MB | INT8 | NPU | Use Export Script |
63
- | QuickSRNetSmall-Quantized | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 3.597 ms | 15 - 15 MB | INT8 | NPU | [QuickSRNetSmall-Quantized.onnx](https://huggingface.co/qualcomm/QuickSRNetSmall-Quantized/blob/main/QuickSRNetSmall-Quantized.onnx) |
 
64
 
65
 
66
 
@@ -126,7 +127,7 @@ QuickSRNetSmall-Quantized
126
  Device : Samsung Galaxy S23 (13)
127
  Runtime : TFLITE
128
  Estimated inference time (ms) : 1.1
129
- Estimated peak memory usage (MB): [0, 3]
130
  Total # Ops : 13
131
  Compute Unit(s) : NPU (10 ops) CPU (3 ops)
132
  ```
@@ -147,13 +148,29 @@ in memory using the `jit.trace` and then call the `submit_compile_job` API.
147
  import torch
148
 
149
  import qai_hub as hub
150
- from qai_hub_models.models.quicksrnetsmall_quantized import
151
 
152
  # Load the model
 
153
 
154
  # Device
155
  device = hub.Device("Samsung Galaxy S23")
156
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
 
158
  ```
159
 
 
35
 
36
  | Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
37
  |---|---|---|---|---|---|---|---|---|
38
+ | QuickSRNetSmall-Quantized | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 1.083 ms | 0 - 2 MB | INT8 | NPU | [QuickSRNetSmall-Quantized.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall-Quantized/blob/main/QuickSRNetSmall-Quantized.tflite) |
39
+ | QuickSRNetSmall-Quantized | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 0.467 ms | 0 - 2 MB | INT8 | NPU | [QuickSRNetSmall-Quantized.so](https://huggingface.co/qualcomm/QuickSRNetSmall-Quantized/blob/main/QuickSRNetSmall-Quantized.so) |
40
+ | QuickSRNetSmall-Quantized | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 3.516 ms | 14 - 15 MB | INT8 | NPU | [QuickSRNetSmall-Quantized.onnx](https://huggingface.co/qualcomm/QuickSRNetSmall-Quantized/blob/main/QuickSRNetSmall-Quantized.onnx) |
41
+ | QuickSRNetSmall-Quantized | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 0.885 ms | 0 - 10 MB | INT8 | NPU | [QuickSRNetSmall-Quantized.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall-Quantized/blob/main/QuickSRNetSmall-Quantized.tflite) |
42
+ | QuickSRNetSmall-Quantized | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 0.314 ms | 0 - 10 MB | INT8 | NPU | [QuickSRNetSmall-Quantized.so](https://huggingface.co/qualcomm/QuickSRNetSmall-Quantized/blob/main/QuickSRNetSmall-Quantized.so) |
43
+ | QuickSRNetSmall-Quantized | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 2.807 ms | 0 - 28 MB | INT8 | NPU | [QuickSRNetSmall-Quantized.onnx](https://huggingface.co/qualcomm/QuickSRNetSmall-Quantized/blob/main/QuickSRNetSmall-Quantized.onnx) |
44
+ | QuickSRNetSmall-Quantized | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 1.327 ms | 0 - 9 MB | INT8 | NPU | [QuickSRNetSmall-Quantized.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall-Quantized/blob/main/QuickSRNetSmall-Quantized.tflite) |
45
+ | QuickSRNetSmall-Quantized | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 0.343 ms | 0 - 9 MB | INT8 | NPU | Use Export Script |
46
+ | QuickSRNetSmall-Quantized | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 2.231 ms | 0 - 17 MB | INT8 | NPU | [QuickSRNetSmall-Quantized.onnx](https://huggingface.co/qualcomm/QuickSRNetSmall-Quantized/blob/main/QuickSRNetSmall-Quantized.onnx) |
47
+ | QuickSRNetSmall-Quantized | RB3 Gen 2 (Proxy) | QCS6490 Proxy | TFLITE | 3.249 ms | 0 - 9 MB | INT8 | NPU | [QuickSRNetSmall-Quantized.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall-Quantized/blob/main/QuickSRNetSmall-Quantized.tflite) |
48
+ | QuickSRNetSmall-Quantized | RB3 Gen 2 (Proxy) | QCS6490 Proxy | QNN | 0.941 ms | 0 - 8 MB | INT8 | NPU | Use Export Script |
49
+ | QuickSRNetSmall-Quantized | RB5 (Proxy) | QCS8250 Proxy | TFLITE | 10.691 ms | 2 - 4 MB | INT8 | NPU | [QuickSRNetSmall-Quantized.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall-Quantized/blob/main/QuickSRNetSmall-Quantized.tflite) |
50
+ | QuickSRNetSmall-Quantized | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 1.083 ms | 0 - 2 MB | INT8 | NPU | [QuickSRNetSmall-Quantized.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall-Quantized/blob/main/QuickSRNetSmall-Quantized.tflite) |
51
+ | QuickSRNetSmall-Quantized | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 0.386 ms | 0 - 2 MB | INT8 | NPU | Use Export Script |
52
+ | QuickSRNetSmall-Quantized | SA7255P ADP | SA7255P | TFLITE | 3.889 ms | 2 - 11 MB | INT8 | NPU | [QuickSRNetSmall-Quantized.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall-Quantized/blob/main/QuickSRNetSmall-Quantized.tflite) |
53
+ | QuickSRNetSmall-Quantized | SA7255P ADP | SA7255P | QNN | 1.927 ms | 0 - 5 MB | INT8 | NPU | Use Export Script |
54
+ | QuickSRNetSmall-Quantized | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 1.073 ms | 0 - 12 MB | INT8 | NPU | [QuickSRNetSmall-Quantized.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall-Quantized/blob/main/QuickSRNetSmall-Quantized.tflite) |
55
+ | QuickSRNetSmall-Quantized | SA8255 (Proxy) | SA8255P Proxy | QNN | 0.402 ms | 0 - 1 MB | INT8 | NPU | Use Export Script |
56
+ | QuickSRNetSmall-Quantized | SA8295P ADP | SA8295P | TFLITE | 1.806 ms | 0 - 7 MB | INT8 | NPU | [QuickSRNetSmall-Quantized.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall-Quantized/blob/main/QuickSRNetSmall-Quantized.tflite) |
57
+ | QuickSRNetSmall-Quantized | SA8295P ADP | SA8295P | QNN | 0.893 ms | 0 - 6 MB | INT8 | NPU | Use Export Script |
58
+ | QuickSRNetSmall-Quantized | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 1.077 ms | 0 - 13 MB | INT8 | NPU | [QuickSRNetSmall-Quantized.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall-Quantized/blob/main/QuickSRNetSmall-Quantized.tflite) |
59
+ | QuickSRNetSmall-Quantized | SA8650 (Proxy) | SA8650P Proxy | QNN | 0.4 ms | 0 - 2 MB | INT8 | NPU | Use Export Script |
60
+ | QuickSRNetSmall-Quantized | SA8775P ADP | SA8775P | TFLITE | 2.065 ms | 0 - 7 MB | INT8 | NPU | [QuickSRNetSmall-Quantized.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall-Quantized/blob/main/QuickSRNetSmall-Quantized.tflite) |
61
+ | QuickSRNetSmall-Quantized | SA8775P ADP | SA8775P | QNN | 0.89 ms | 0 - 5 MB | INT8 | NPU | Use Export Script |
62
+ | QuickSRNetSmall-Quantized | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 1.312 ms | 0 - 10 MB | INT8 | NPU | [QuickSRNetSmall-Quantized.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall-Quantized/blob/main/QuickSRNetSmall-Quantized.tflite) |
63
+ | QuickSRNetSmall-Quantized | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 0.539 ms | 0 - 11 MB | INT8 | NPU | Use Export Script |
64
+ | QuickSRNetSmall-Quantized | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 0.491 ms | 0 - 0 MB | INT8 | NPU | Use Export Script |
65
 
66
 
67
 
 
127
  Device : Samsung Galaxy S23 (13)
128
  Runtime : TFLITE
129
  Estimated inference time (ms) : 1.1
130
+ Estimated peak memory usage (MB): [0, 2]
131
  Total # Ops : 13
132
  Compute Unit(s) : NPU (10 ops) CPU (3 ops)
133
  ```
 
148
  import torch
149
 
150
  import qai_hub as hub
151
+ from qai_hub_models.models.quicksrnetsmall_quantized import Model
152
 
153
  # Load the model
154
+ torch_model = Model.from_pretrained()
155
 
156
  # Device
157
  device = hub.Device("Samsung Galaxy S23")
158
 
159
+ # Trace model
160
+ input_shape = torch_model.get_input_spec()
161
+ sample_inputs = torch_model.sample_inputs()
162
+
163
+ pt_model = torch.jit.trace(torch_model, [torch.tensor(data[0]) for _, data in sample_inputs.items()])
164
+
165
+ # Compile model on a specific device
166
+ compile_job = hub.submit_compile_job(
167
+ model=pt_model,
168
+ device=device,
169
+ input_specs=torch_model.get_input_spec(),
170
+ )
171
+
172
+ # Get target model to run on-device
173
+ target_model = compile_job.get_target_model()
174
 
175
  ```
176