bhushans commited on
Commit
ab7970d
·
verified ·
1 Parent(s): d3835d7

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
- | Shufflenet-v2 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 1.202 ms | 0 - 1 MB | FP16 | NPU | [Shufflenet-v2.tflite](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.tflite) |
38
- | Shufflenet-v2 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 0.775 ms | 1 - 35 MB | FP16 | NPU | [Shufflenet-v2.so](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.so) |
39
- | Shufflenet-v2 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 1.089 ms | 0 - 4 MB | FP16 | NPU | [Shufflenet-v2.onnx](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.onnx) |
40
- | Shufflenet-v2 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 0.783 ms | 0 - 38 MB | FP16 | NPU | [Shufflenet-v2.tflite](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.tflite) |
41
- | Shufflenet-v2 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 0.51 ms | 0 - 12 MB | FP16 | NPU | [Shufflenet-v2.so](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.so) |
42
- | Shufflenet-v2 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 0.721 ms | 0 - 40 MB | FP16 | NPU | [Shufflenet-v2.onnx](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.onnx) |
43
- | Shufflenet-v2 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 0.803 ms | 0 - 21 MB | FP16 | NPU | [Shufflenet-v2.tflite](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.tflite) |
44
- | Shufflenet-v2 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 0.498 ms | 0 - 10 MB | FP16 | NPU | Use Export Script |
45
- | Shufflenet-v2 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 0.782 ms | 0 - 23 MB | FP16 | NPU | [Shufflenet-v2.onnx](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.onnx) |
46
- | Shufflenet-v2 | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 1.199 ms | 0 - 1 MB | FP16 | NPU | [Shufflenet-v2.tflite](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.tflite) |
47
- | Shufflenet-v2 | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 0.729 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
48
- | Shufflenet-v2 | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 1.198 ms | 0 - 1 MB | FP16 | NPU | [Shufflenet-v2.tflite](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.tflite) |
49
- | Shufflenet-v2 | SA8255 (Proxy) | SA8255P Proxy | QNN | 0.739 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
50
- | Shufflenet-v2 | SA8775 (Proxy) | SA8775P Proxy | TFLITE | 1.203 ms | 0 - 1 MB | FP16 | NPU | [Shufflenet-v2.tflite](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.tflite) |
51
- | Shufflenet-v2 | SA8775 (Proxy) | SA8775P Proxy | QNN | 0.739 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
52
- | Shufflenet-v2 | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 1.201 ms | 0 - 3 MB | FP16 | NPU | [Shufflenet-v2.tflite](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.tflite) |
53
- | Shufflenet-v2 | SA8650 (Proxy) | SA8650P Proxy | QNN | 0.739 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
54
- | Shufflenet-v2 | SA8295P ADP | SA8295P | TFLITE | 1.787 ms | 0 - 20 MB | FP16 | NPU | [Shufflenet-v2.tflite](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.tflite) |
55
- | Shufflenet-v2 | SA8295P ADP | SA8295P | QNN | 1.332 ms | 0 - 6 MB | FP16 | NPU | Use Export Script |
56
- | Shufflenet-v2 | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 1.32 ms | 0 - 39 MB | FP16 | NPU | [Shufflenet-v2.tflite](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.tflite) |
57
- | Shufflenet-v2 | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 0.882 ms | 1 - 15 MB | FP16 | NPU | Use Export Script |
58
- | Shufflenet-v2 | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 0.884 ms | 1 - 1 MB | FP16 | NPU | Use Export Script |
59
- | Shufflenet-v2 | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 1.115 ms | 4 - 4 MB | FP16 | NPU | [Shufflenet-v2.onnx](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.onnx) |
 
 
60
 
61
 
62
 
@@ -121,7 +123,7 @@ Shufflenet-v2
121
  Device : Samsung Galaxy S23 (13)
122
  Runtime : TFLITE
123
  Estimated inference time (ms) : 1.2
124
- Estimated peak memory usage (MB): [0, 1]
125
  Total # Ops : 204
126
  Compute Unit(s) : NPU (204 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.shufflenet_v2 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
+ | Shufflenet-v2 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 1.205 ms | 0 - 86 MB | FP16 | NPU | [Shufflenet-v2.tflite](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.tflite) |
38
+ | Shufflenet-v2 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 0.771 ms | 1 - 73 MB | FP16 | NPU | [Shufflenet-v2.so](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.so) |
39
+ | Shufflenet-v2 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 1.125 ms | 0 - 4 MB | FP16 | NPU | [Shufflenet-v2.onnx](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.onnx) |
40
+ | Shufflenet-v2 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 0.792 ms | 0 - 11 MB | FP16 | NPU | [Shufflenet-v2.tflite](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.tflite) |
41
+ | Shufflenet-v2 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 0.512 ms | 0 - 12 MB | FP16 | NPU | [Shufflenet-v2.so](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.so) |
42
+ | Shufflenet-v2 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 0.72 ms | 0 - 41 MB | FP16 | NPU | [Shufflenet-v2.onnx](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.onnx) |
43
+ | Shufflenet-v2 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 0.816 ms | 0 - 11 MB | FP16 | NPU | [Shufflenet-v2.tflite](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.tflite) |
44
+ | Shufflenet-v2 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 0.5 ms | 0 - 10 MB | FP16 | NPU | Use Export Script |
45
+ | Shufflenet-v2 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 0.787 ms | 0 - 23 MB | FP16 | NPU | [Shufflenet-v2.onnx](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.onnx) |
46
+ | Shufflenet-v2 | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 1.199 ms | 0 - 27 MB | FP16 | NPU | [Shufflenet-v2.tflite](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.tflite) |
47
+ | Shufflenet-v2 | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 0.738 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
48
+ | Shufflenet-v2 | SA7255P ADP | SA7255P | TFLITE | 5.091 ms | 0 - 11 MB | FP16 | NPU | [Shufflenet-v2.tflite](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.tflite) |
49
+ | Shufflenet-v2 | SA7255P ADP | SA7255P | QNN | 4.553 ms | 1 - 6 MB | FP16 | NPU | Use Export Script |
50
+ | Shufflenet-v2 | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 1.213 ms | 0 - 15 MB | FP16 | NPU | [Shufflenet-v2.tflite](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.tflite) |
51
+ | Shufflenet-v2 | SA8255 (Proxy) | SA8255P Proxy | QNN | 0.742 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
52
+ | Shufflenet-v2 | SA8295P ADP | SA8295P | TFLITE | 1.766 ms | 0 - 10 MB | FP16 | NPU | [Shufflenet-v2.tflite](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.tflite) |
53
+ | Shufflenet-v2 | SA8295P ADP | SA8295P | QNN | 1.323 ms | 1 - 6 MB | FP16 | NPU | Use Export Script |
54
+ | Shufflenet-v2 | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 1.236 ms | 0 - 15 MB | FP16 | NPU | [Shufflenet-v2.tflite](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.tflite) |
55
+ | Shufflenet-v2 | SA8650 (Proxy) | SA8650P Proxy | QNN | 0.742 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
56
+ | Shufflenet-v2 | SA8775P ADP | SA8775P | TFLITE | 1.816 ms | 0 - 9 MB | FP16 | NPU | [Shufflenet-v2.tflite](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.tflite) |
57
+ | Shufflenet-v2 | SA8775P ADP | SA8775P | QNN | 1.398 ms | 1 - 6 MB | FP16 | NPU | Use Export Script |
58
+ | Shufflenet-v2 | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 1.322 ms | 0 - 15 MB | FP16 | NPU | [Shufflenet-v2.tflite](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.tflite) |
59
+ | Shufflenet-v2 | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 0.892 ms | 0 - 14 MB | FP16 | NPU | Use Export Script |
60
+ | Shufflenet-v2 | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 0.907 ms | 1 - 1 MB | FP16 | NPU | Use Export Script |
61
+ | Shufflenet-v2 | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 1.146 ms | 5 - 5 MB | FP16 | NPU | [Shufflenet-v2.onnx](https://huggingface.co/qualcomm/Shufflenet-v2/blob/main/Shufflenet-v2.onnx) |
62
 
63
 
64
 
 
123
  Device : Samsung Galaxy S23 (13)
124
  Runtime : TFLITE
125
  Estimated inference time (ms) : 1.2
126
+ Estimated peak memory usage (MB): [0, 86]
127
  Total # Ops : 204
128
  Compute Unit(s) : NPU (204 ops)
129
  ```
 
144
  import torch
145
 
146
  import qai_hub as hub
147
+ from qai_hub_models.models.shufflenet_v2 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