bhushans commited on
Commit
49dd35a
1 Parent(s): 8a4a66f

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +43 -25
README.md CHANGED
@@ -35,29 +35,31 @@ 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
- | RegNet | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 2.057 ms | 0 - 2 MB | FP16 | NPU | [RegNet.tflite](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.tflite) |
39
- | RegNet | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 2.138 ms | 1 - 59 MB | FP16 | NPU | [RegNet.so](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.so) |
40
- | RegNet | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 2.164 ms | 0 - 41 MB | FP16 | NPU | [RegNet.onnx](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.onnx) |
41
- | RegNet | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 1.394 ms | 0 - 144 MB | FP16 | NPU | [RegNet.tflite](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.tflite) |
42
- | RegNet | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 1.485 ms | 0 - 30 MB | FP16 | NPU | [RegNet.so](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.so) |
43
- | RegNet | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 1.574 ms | 0 - 146 MB | FP16 | NPU | [RegNet.onnx](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.onnx) |
44
- | RegNet | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 1.383 ms | 0 - 71 MB | FP16 | NPU | [RegNet.tflite](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.tflite) |
45
- | RegNet | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 1.425 ms | 0 - 28 MB | FP16 | NPU | Use Export Script |
46
- | RegNet | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 1.334 ms | 0 - 74 MB | FP16 | NPU | [RegNet.onnx](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.onnx) |
47
- | RegNet | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 2.023 ms | 0 - 6 MB | FP16 | NPU | [RegNet.tflite](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.tflite) |
48
- | RegNet | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 2.036 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
49
- | RegNet | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 2.033 ms | 0 - 2 MB | FP16 | NPU | [RegNet.tflite](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.tflite) |
50
- | RegNet | SA8255 (Proxy) | SA8255P Proxy | QNN | 2.045 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
51
- | RegNet | SA8775 (Proxy) | SA8775P Proxy | TFLITE | 2.059 ms | 0 - 2 MB | FP16 | NPU | [RegNet.tflite](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.tflite) |
52
- | RegNet | SA8775 (Proxy) | SA8775P Proxy | QNN | 2.016 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
53
- | RegNet | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 2.027 ms | 0 - 315 MB | FP16 | NPU | [RegNet.tflite](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.tflite) |
54
- | RegNet | SA8650 (Proxy) | SA8650P Proxy | QNN | 2.037 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
55
- | RegNet | SA8295P ADP | SA8295P | TFLITE | 3.562 ms | 0 - 40 MB | FP16 | NPU | [RegNet.tflite](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.tflite) |
56
- | RegNet | SA8295P ADP | SA8295P | QNN | 3.655 ms | 1 - 6 MB | FP16 | NPU | Use Export Script |
57
- | RegNet | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 2.802 ms | 0 - 127 MB | FP16 | NPU | [RegNet.tflite](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.tflite) |
58
- | RegNet | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 2.934 ms | 1 - 25 MB | FP16 | NPU | Use Export Script |
59
- | RegNet | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 2.208 ms | 1 - 1 MB | FP16 | NPU | Use Export Script |
60
- | RegNet | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 2.22 ms | 40 - 40 MB | FP16 | NPU | [RegNet.onnx](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.onnx) |
 
 
61
 
62
 
63
 
@@ -122,7 +124,7 @@ RegNet
122
  Device : Samsung Galaxy S23 (13)
123
  Runtime : TFLITE
124
  Estimated inference time (ms) : 2.1
125
- Estimated peak memory usage (MB): [0, 2]
126
  Total # Ops : 114
127
  Compute Unit(s) : NPU (114 ops)
128
  ```
@@ -143,13 +145,29 @@ in memory using the `jit.trace` and then call the `submit_compile_job` API.
143
  import torch
144
 
145
  import qai_hub as hub
146
- from qai_hub_models.models.regnet import
147
 
148
  # Load the model
 
149
 
150
  # Device
151
  device = hub.Device("Samsung Galaxy S23")
152
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
153
 
154
  ```
155
 
 
35
 
36
  | Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
37
  |---|---|---|---|---|---|---|---|---|
38
+ | RegNet | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 2.054 ms | 0 - 112 MB | FP16 | NPU | [RegNet.tflite](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.tflite) |
39
+ | RegNet | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 2.113 ms | 0 - 80 MB | FP16 | NPU | [RegNet.so](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.so) |
40
+ | RegNet | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 2.185 ms | 0 - 43 MB | FP16 | NPU | [RegNet.onnx](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.onnx) |
41
+ | RegNet | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 1.405 ms | 0 - 27 MB | FP16 | NPU | [RegNet.tflite](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.tflite) |
42
+ | RegNet | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 1.527 ms | 0 - 28 MB | FP16 | NPU | [RegNet.so](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.so) |
43
+ | RegNet | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 1.605 ms | 0 - 145 MB | FP16 | NPU | [RegNet.onnx](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.onnx) |
44
+ | RegNet | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 1.388 ms | 0 - 28 MB | FP16 | NPU | [RegNet.tflite](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.tflite) |
45
+ | RegNet | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 1.233 ms | 1 - 28 MB | FP16 | NPU | Use Export Script |
46
+ | RegNet | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 1.312 ms | 0 - 74 MB | FP16 | NPU | [RegNet.onnx](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.onnx) |
47
+ | RegNet | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 2.023 ms | 0 - 122 MB | FP16 | NPU | [RegNet.tflite](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.tflite) |
48
+ | RegNet | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 2.024 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
49
+ | RegNet | SA7255P ADP | SA7255P | TFLITE | 69.226 ms | 0 - 27 MB | FP16 | NPU | [RegNet.tflite](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.tflite) |
50
+ | RegNet | SA7255P ADP | SA7255P | QNN | 69.73 ms | 0 - 6 MB | FP16 | NPU | Use Export Script |
51
+ | RegNet | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 2.076 ms | 0 - 112 MB | FP16 | NPU | [RegNet.tflite](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.tflite) |
52
+ | RegNet | SA8255 (Proxy) | SA8255P Proxy | QNN | 2.04 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
53
+ | RegNet | SA8295P ADP | SA8295P | TFLITE | 3.547 ms | 0 - 22 MB | FP16 | NPU | [RegNet.tflite](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.tflite) |
54
+ | RegNet | SA8295P ADP | SA8295P | QNN | 3.715 ms | 1 - 6 MB | FP16 | NPU | Use Export Script |
55
+ | RegNet | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 2.048 ms | 0 - 112 MB | FP16 | NPU | [RegNet.tflite](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.tflite) |
56
+ | RegNet | SA8650 (Proxy) | SA8650P Proxy | QNN | 2.017 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
57
+ | RegNet | SA8775P ADP | SA8775P | TFLITE | 3.959 ms | 0 - 26 MB | FP16 | NPU | [RegNet.tflite](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.tflite) |
58
+ | RegNet | SA8775P ADP | SA8775P | QNN | 4.12 ms | 0 - 6 MB | FP16 | NPU | Use Export Script |
59
+ | RegNet | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 2.835 ms | 0 - 24 MB | FP16 | NPU | [RegNet.tflite](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.tflite) |
60
+ | RegNet | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 2.95 ms | 1 - 24 MB | FP16 | NPU | Use Export Script |
61
+ | RegNet | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 2.226 ms | 1 - 1 MB | FP16 | NPU | Use Export Script |
62
+ | RegNet | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 2.204 ms | 40 - 40 MB | FP16 | NPU | [RegNet.onnx](https://huggingface.co/qualcomm/RegNet/blob/main/RegNet.onnx) |
63
 
64
 
65
 
 
124
  Device : Samsung Galaxy S23 (13)
125
  Runtime : TFLITE
126
  Estimated inference time (ms) : 2.1
127
+ Estimated peak memory usage (MB): [0, 112]
128
  Total # Ops : 114
129
  Compute Unit(s) : NPU (114 ops)
130
  ```
 
145
  import torch
146
 
147
  import qai_hub as hub
148
+ from qai_hub_models.models.regnet import Model
149
 
150
  # Load the model
151
+ torch_model = Model.from_pretrained()
152
 
153
  # Device
154
  device = hub.Device("Samsung Galaxy S23")
155
 
156
+ # Trace model
157
+ input_shape = torch_model.get_input_spec()
158
+ sample_inputs = torch_model.sample_inputs()
159
+
160
+ pt_model = torch.jit.trace(torch_model, [torch.tensor(data[0]) for _, data in sample_inputs.items()])
161
+
162
+ # Compile model on a specific device
163
+ compile_job = hub.submit_compile_job(
164
+ model=pt_model,
165
+ device=device,
166
+ input_specs=torch_model.get_input_spec(),
167
+ )
168
+
169
+ # Get target model to run on-device
170
+ target_model = compile_job.get_target_model()
171
 
172
  ```
173