bhushans commited on
Commit
9d2fa66
·
verified ·
1 Parent(s): 3a20d53

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +42 -25
README.md CHANGED
@@ -35,29 +35,30 @@ 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
- | ResNeXt101 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 6.548 ms | 0 - 2 MB | FP16 | NPU | [ResNeXt101.tflite](https://huggingface.co/qualcomm/ResNeXt101/blob/main/ResNeXt101.tflite) |
39
- | ResNeXt101 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 6.647 ms | 0 - 34 MB | FP16 | NPU | [ResNeXt101.so](https://huggingface.co/qualcomm/ResNeXt101/blob/main/ResNeXt101.so) |
40
- | ResNeXt101 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 7.106 ms | 0 - 194 MB | FP16 | NPU | [ResNeXt101.onnx](https://huggingface.co/qualcomm/ResNeXt101/blob/main/ResNeXt101.onnx) |
41
- | ResNeXt101 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 4.628 ms | 0 - 371 MB | FP16 | NPU | [ResNeXt101.tflite](https://huggingface.co/qualcomm/ResNeXt101/blob/main/ResNeXt101.tflite) |
42
- | ResNeXt101 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 4.681 ms | 0 - 91 MB | FP16 | NPU | [ResNeXt101.so](https://huggingface.co/qualcomm/ResNeXt101/blob/main/ResNeXt101.so) |
43
- | ResNeXt101 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 5.195 ms | 1 - 376 MB | FP16 | NPU | [ResNeXt101.onnx](https://huggingface.co/qualcomm/ResNeXt101/blob/main/ResNeXt101.onnx) |
44
- | ResNeXt101 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 4.583 ms | 0 - 157 MB | FP16 | NPU | [ResNeXt101.tflite](https://huggingface.co/qualcomm/ResNeXt101/blob/main/ResNeXt101.tflite) |
45
- | ResNeXt101 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 4.827 ms | 0 - 96 MB | FP16 | NPU | Use Export Script |
46
- | ResNeXt101 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 5.001 ms | 0 - 159 MB | FP16 | NPU | [ResNeXt101.onnx](https://huggingface.co/qualcomm/ResNeXt101/blob/main/ResNeXt101.onnx) |
47
- | ResNeXt101 | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 6.483 ms | 0 - 2 MB | FP16 | NPU | [ResNeXt101.tflite](https://huggingface.co/qualcomm/ResNeXt101/blob/main/ResNeXt101.tflite) |
48
- | ResNeXt101 | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 6.776 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
49
- | ResNeXt101 | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 6.609 ms | 0 - 3 MB | FP16 | NPU | [ResNeXt101.tflite](https://huggingface.co/qualcomm/ResNeXt101/blob/main/ResNeXt101.tflite) |
50
- | ResNeXt101 | SA8255 (Proxy) | SA8255P Proxy | QNN | 6.845 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
51
- | ResNeXt101 | SA8775 (Proxy) | SA8775P Proxy | TFLITE | 6.491 ms | 0 - 2 MB | FP16 | NPU | [ResNeXt101.tflite](https://huggingface.co/qualcomm/ResNeXt101/blob/main/ResNeXt101.tflite) |
52
- | ResNeXt101 | SA8775 (Proxy) | SA8775P Proxy | QNN | 6.884 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
53
- | ResNeXt101 | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 6.823 ms | 0 - 2 MB | FP16 | NPU | [ResNeXt101.tflite](https://huggingface.co/qualcomm/ResNeXt101/blob/main/ResNeXt101.tflite) |
54
- | ResNeXt101 | SA8650 (Proxy) | SA8650P Proxy | QNN | 6.784 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
55
- | ResNeXt101 | SA8295P ADP | SA8295P | TFLITE | 10.687 ms | 0 - 101 MB | FP16 | NPU | [ResNeXt101.tflite](https://huggingface.co/qualcomm/ResNeXt101/blob/main/ResNeXt101.tflite) |
56
- | ResNeXt101 | SA8295P ADP | SA8295P | QNN | 10.828 ms | 1 - 6 MB | FP16 | NPU | Use Export Script |
57
- | ResNeXt101 | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 9.218 ms | 0 - 164 MB | FP16 | NPU | [ResNeXt101.tflite](https://huggingface.co/qualcomm/ResNeXt101/blob/main/ResNeXt101.tflite) |
58
- | ResNeXt101 | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 9.281 ms | 1 - 52 MB | FP16 | NPU | Use Export Script |
59
- | ResNeXt101 | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 6.907 ms | 1 - 1 MB | FP16 | NPU | Use Export Script |
60
- | ResNeXt101 | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 6.817 ms | 173 - 173 MB | FP16 | NPU | [ResNeXt101.onnx](https://huggingface.co/qualcomm/ResNeXt101/blob/main/ResNeXt101.onnx) |
 
61
 
62
 
63
 
@@ -122,7 +123,7 @@ ResNeXt101
122
  Device : Samsung Galaxy S23 (13)
123
  Runtime : TFLITE
124
  Estimated inference time (ms) : 6.5
125
- Estimated peak memory usage (MB): [0, 2]
126
  Total # Ops : 147
127
  Compute Unit(s) : NPU (147 ops)
128
  ```
@@ -143,13 +144,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.resnext101 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
+ | ResNeXt101 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 6.511 ms | 0 - 38 MB | FP16 | NPU | [ResNeXt101.tflite](https://huggingface.co/qualcomm/ResNeXt101/blob/main/ResNeXt101.tflite) |
39
+ | ResNeXt101 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 6.63 ms | 0 - 32 MB | FP16 | NPU | [ResNeXt101.so](https://huggingface.co/qualcomm/ResNeXt101/blob/main/ResNeXt101.so) |
40
+ | ResNeXt101 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 7.105 ms | 0 - 194 MB | FP16 | NPU | [ResNeXt101.onnx](https://huggingface.co/qualcomm/ResNeXt101/blob/main/ResNeXt101.onnx) |
41
+ | ResNeXt101 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 4.666 ms | 0 - 88 MB | FP16 | NPU | [ResNeXt101.tflite](https://huggingface.co/qualcomm/ResNeXt101/blob/main/ResNeXt101.tflite) |
42
+ | ResNeXt101 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 4.757 ms | 1 - 89 MB | FP16 | NPU | [ResNeXt101.so](https://huggingface.co/qualcomm/ResNeXt101/blob/main/ResNeXt101.so) |
43
+ | ResNeXt101 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 5.13 ms | 0 - 373 MB | FP16 | NPU | [ResNeXt101.onnx](https://huggingface.co/qualcomm/ResNeXt101/blob/main/ResNeXt101.onnx) |
44
+ | ResNeXt101 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 4.616 ms | 0 - 97 MB | FP16 | NPU | [ResNeXt101.tflite](https://huggingface.co/qualcomm/ResNeXt101/blob/main/ResNeXt101.tflite) |
45
+ | ResNeXt101 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 4.691 ms | 0 - 95 MB | FP16 | NPU | Use Export Script |
46
+ | ResNeXt101 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 5.091 ms | 0 - 161 MB | FP16 | NPU | [ResNeXt101.onnx](https://huggingface.co/qualcomm/ResNeXt101/blob/main/ResNeXt101.onnx) |
47
+ | ResNeXt101 | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 6.443 ms | 0 - 34 MB | FP16 | NPU | [ResNeXt101.tflite](https://huggingface.co/qualcomm/ResNeXt101/blob/main/ResNeXt101.tflite) |
48
+ | ResNeXt101 | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 6.769 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
49
+ | ResNeXt101 | SA7255P ADP | SA7255P | TFLITE | 272.498 ms | 0 - 96 MB | FP16 | NPU | [ResNeXt101.tflite](https://huggingface.co/qualcomm/ResNeXt101/blob/main/ResNeXt101.tflite) |
50
+ | ResNeXt101 | SA7255P ADP | SA7255P | QNN | 273.074 ms | 1 - 6 MB | FP16 | NPU | Use Export Script |
51
+ | ResNeXt101 | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 6.431 ms | 0 - 34 MB | FP16 | NPU | [ResNeXt101.tflite](https://huggingface.co/qualcomm/ResNeXt101/blob/main/ResNeXt101.tflite) |
52
+ | ResNeXt101 | SA8255 (Proxy) | SA8255P Proxy | QNN | 6.84 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
53
+ | ResNeXt101 | SA8295P ADP | SA8295P | TFLITE | 10.716 ms | 0 - 50 MB | FP16 | NPU | [ResNeXt101.tflite](https://huggingface.co/qualcomm/ResNeXt101/blob/main/ResNeXt101.tflite) |
54
+ | ResNeXt101 | SA8295P ADP | SA8295P | QNN | 10.958 ms | 1 - 6 MB | FP16 | NPU | Use Export Script |
55
+ | ResNeXt101 | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 6.499 ms | 0 - 34 MB | FP16 | NPU | [ResNeXt101.tflite](https://huggingface.co/qualcomm/ResNeXt101/blob/main/ResNeXt101.tflite) |
56
+ | ResNeXt101 | SA8650 (Proxy) | SA8650P Proxy | QNN | 6.811 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
57
+ | ResNeXt101 | SA8775P ADP | SA8775P | QNN | 12.373 ms | 0 - 6 MB | FP16 | NPU | Use Export Script |
58
+ | ResNeXt101 | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 9.22 ms | 0 - 57 MB | FP16 | NPU | [ResNeXt101.tflite](https://huggingface.co/qualcomm/ResNeXt101/blob/main/ResNeXt101.tflite) |
59
+ | ResNeXt101 | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 9.234 ms | 1 - 57 MB | FP16 | NPU | Use Export Script |
60
+ | ResNeXt101 | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 6.844 ms | 1 - 1 MB | FP16 | NPU | Use Export Script |
61
+ | ResNeXt101 | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 6.81 ms | 173 - 173 MB | FP16 | NPU | [ResNeXt101.onnx](https://huggingface.co/qualcomm/ResNeXt101/blob/main/ResNeXt101.onnx) |
62
 
63
 
64
 
 
123
  Device : Samsung Galaxy S23 (13)
124
  Runtime : TFLITE
125
  Estimated inference time (ms) : 6.5
126
+ Estimated peak memory usage (MB): [0, 38]
127
  Total # Ops : 147
128
  Compute Unit(s) : NPU (147 ops)
129
  ```
 
144
  import torch
145
 
146
  import qai_hub as hub
147
+ from qai_hub_models.models.resnext101 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