bhushans commited on
Commit
8e0d7bf
·
verified ·
1 Parent(s): d2f7ad5

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +41 -23
README.md CHANGED
@@ -36,28 +36,30 @@ More details on model performance across various devices, can be found
36
 
37
  | Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
38
  |---|---|---|---|---|---|---|---|---|
39
- | ResNet101Quantized | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 1.162 ms | 0 - 1 MB | INT8 | NPU | [ResNet101Quantized.tflite](https://huggingface.co/qualcomm/ResNet101Quantized/blob/main/ResNet101Quantized.tflite) |
40
- | ResNet101Quantized | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 1.384 ms | 0 - 55 MB | INT8 | NPU | [ResNet101Quantized.so](https://huggingface.co/qualcomm/ResNet101Quantized/blob/main/ResNet101Quantized.so) |
41
- | ResNet101Quantized | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 0.873 ms | 0 - 98 MB | INT8 | NPU | [ResNet101Quantized.tflite](https://huggingface.co/qualcomm/ResNet101Quantized/blob/main/ResNet101Quantized.tflite) |
42
- | ResNet101Quantized | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 1.038 ms | 0 - 25 MB | INT8 | NPU | [ResNet101Quantized.so](https://huggingface.co/qualcomm/ResNet101Quantized/blob/main/ResNet101Quantized.so) |
43
- | ResNet101Quantized | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 0.793 ms | 0 - 30 MB | INT8 | NPU | [ResNet101Quantized.tflite](https://huggingface.co/qualcomm/ResNet101Quantized/blob/main/ResNet101Quantized.tflite) |
44
- | ResNet101Quantized | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 0.884 ms | 0 - 23 MB | INT8 | NPU | Use Export Script |
45
- | ResNet101Quantized | RB3 Gen 2 (Proxy) | QCS6490 Proxy | TFLITE | 4.441 ms | 0 - 35 MB | INT8 | NPU | [ResNet101Quantized.tflite](https://huggingface.co/qualcomm/ResNet101Quantized/blob/main/ResNet101Quantized.tflite) |
46
- | ResNet101Quantized | RB3 Gen 2 (Proxy) | QCS6490 Proxy | QNN | 6.992 ms | 1 - 8 MB | INT8 | NPU | Use Export Script |
47
- | ResNet101Quantized | RB5 (Proxy) | QCS8250 Proxy | TFLITE | 17.119 ms | 0 - 2 MB | INT8 | NPU | [ResNet101Quantized.tflite](https://huggingface.co/qualcomm/ResNet101Quantized/blob/main/ResNet101Quantized.tflite) |
48
- | ResNet101Quantized | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 1.159 ms | 0 - 2 MB | INT8 | NPU | [ResNet101Quantized.tflite](https://huggingface.co/qualcomm/ResNet101Quantized/blob/main/ResNet101Quantized.tflite) |
49
- | ResNet101Quantized | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 1.32 ms | 0 - 1 MB | INT8 | NPU | Use Export Script |
50
- | ResNet101Quantized | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 1.16 ms | 0 - 375 MB | INT8 | NPU | [ResNet101Quantized.tflite](https://huggingface.co/qualcomm/ResNet101Quantized/blob/main/ResNet101Quantized.tflite) |
 
 
51
  | ResNet101Quantized | SA8255 (Proxy) | SA8255P Proxy | QNN | 1.333 ms | 0 - 1 MB | INT8 | NPU | Use Export Script |
52
- | ResNet101Quantized | SA8775 (Proxy) | SA8775P Proxy | TFLITE | 1.164 ms | 0 - 14 MB | INT8 | NPU | [ResNet101Quantized.tflite](https://huggingface.co/qualcomm/ResNet101Quantized/blob/main/ResNet101Quantized.tflite) |
53
- | ResNet101Quantized | SA8775 (Proxy) | SA8775P Proxy | QNN | 1.323 ms | 0 - 1 MB | INT8 | NPU | Use Export Script |
54
- | ResNet101Quantized | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 1.168 ms | 0 - 21 MB | INT8 | NPU | [ResNet101Quantized.tflite](https://huggingface.co/qualcomm/ResNet101Quantized/blob/main/ResNet101Quantized.tflite) |
55
- | ResNet101Quantized | SA8650 (Proxy) | SA8650P Proxy | QNN | 1.33 ms | 0 - 1 MB | INT8 | NPU | Use Export Script |
56
- | ResNet101Quantized | SA8295P ADP | SA8295P | TFLITE | 1.774 ms | 0 - 30 MB | INT8 | NPU | [ResNet101Quantized.tflite](https://huggingface.co/qualcomm/ResNet101Quantized/blob/main/ResNet101Quantized.tflite) |
57
- | ResNet101Quantized | SA8295P ADP | SA8295P | QNN | 2.076 ms | 0 - 6 MB | INT8 | NPU | Use Export Script |
58
- | ResNet101Quantized | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 1.365 ms | 0 - 99 MB | INT8 | NPU | [ResNet101Quantized.tflite](https://huggingface.co/qualcomm/ResNet101Quantized/blob/main/ResNet101Quantized.tflite) |
59
- | ResNet101Quantized | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 1.612 ms | 0 - 23 MB | INT8 | NPU | Use Export Script |
60
- | ResNet101Quantized | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 1.313 ms | 0 - 0 MB | INT8 | NPU | Use Export Script |
61
 
62
 
63
 
@@ -122,7 +124,7 @@ ResNet101Quantized
122
  Device : Samsung Galaxy S23 (13)
123
  Runtime : TFLITE
124
  Estimated inference time (ms) : 1.2
125
- Estimated peak memory usage (MB): [0, 1]
126
  Total # Ops : 150
127
  Compute Unit(s) : NPU (150 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.resnet101_quantized import
147
 
148
  # Load the model
 
149
 
150
  # Device
151
  device = hub.Device("Samsung Galaxy S23")
152
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
153
 
154
  ```
155
 
 
36
 
37
  | Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
38
  |---|---|---|---|---|---|---|---|---|
39
+ | ResNet101Quantized | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 1.169 ms | 0 - 56 MB | INT8 | NPU | [ResNet101Quantized.tflite](https://huggingface.co/qualcomm/ResNet101Quantized/blob/main/ResNet101Quantized.tflite) |
40
+ | ResNet101Quantized | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 1.378 ms | 0 - 177 MB | INT8 | NPU | [ResNet101Quantized.so](https://huggingface.co/qualcomm/ResNet101Quantized/blob/main/ResNet101Quantized.so) |
41
+ | ResNet101Quantized | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 0.883 ms | 0 - 37 MB | INT8 | NPU | [ResNet101Quantized.tflite](https://huggingface.co/qualcomm/ResNet101Quantized/blob/main/ResNet101Quantized.tflite) |
42
+ | ResNet101Quantized | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 1.07 ms | 0 - 20 MB | INT8 | NPU | [ResNet101Quantized.so](https://huggingface.co/qualcomm/ResNet101Quantized/blob/main/ResNet101Quantized.so) |
43
+ | ResNet101Quantized | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 0.797 ms | 0 - 24 MB | INT8 | NPU | [ResNet101Quantized.tflite](https://huggingface.co/qualcomm/ResNet101Quantized/blob/main/ResNet101Quantized.tflite) |
44
+ | ResNet101Quantized | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 0.95 ms | 0 - 22 MB | INT8 | NPU | Use Export Script |
45
+ | ResNet101Quantized | RB3 Gen 2 (Proxy) | QCS6490 Proxy | TFLITE | 4.668 ms | 0 - 29 MB | INT8 | NPU | [ResNet101Quantized.tflite](https://huggingface.co/qualcomm/ResNet101Quantized/blob/main/ResNet101Quantized.tflite) |
46
+ | ResNet101Quantized | RB3 Gen 2 (Proxy) | QCS6490 Proxy | QNN | 6.523 ms | 0 - 8 MB | INT8 | NPU | Use Export Script |
47
+ | ResNet101Quantized | RB5 (Proxy) | QCS8250 Proxy | TFLITE | 17.433 ms | 0 - 7 MB | INT8 | NPU | [ResNet101Quantized.tflite](https://huggingface.co/qualcomm/ResNet101Quantized/blob/main/ResNet101Quantized.tflite) |
48
+ | ResNet101Quantized | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 1.161 ms | 0 - 11 MB | INT8 | NPU | [ResNet101Quantized.tflite](https://huggingface.co/qualcomm/ResNet101Quantized/blob/main/ResNet101Quantized.tflite) |
49
+ | ResNet101Quantized | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 1.325 ms | 0 - 1 MB | INT8 | NPU | Use Export Script |
50
+ | ResNet101Quantized | SA7255P ADP | SA7255P | TFLITE | 16.08 ms | 0 - 22 MB | INT8 | NPU | [ResNet101Quantized.tflite](https://huggingface.co/qualcomm/ResNet101Quantized/blob/main/ResNet101Quantized.tflite) |
51
+ | ResNet101Quantized | SA7255P ADP | SA7255P | QNN | 16.755 ms | 0 - 7 MB | INT8 | NPU | Use Export Script |
52
+ | ResNet101Quantized | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 1.17 ms | 0 - 56 MB | INT8 | NPU | [ResNet101Quantized.tflite](https://huggingface.co/qualcomm/ResNet101Quantized/blob/main/ResNet101Quantized.tflite) |
53
  | ResNet101Quantized | SA8255 (Proxy) | SA8255P Proxy | QNN | 1.333 ms | 0 - 1 MB | INT8 | NPU | Use Export Script |
54
+ | ResNet101Quantized | SA8295P ADP | SA8295P | TFLITE | 1.779 ms | 0 - 22 MB | INT8 | NPU | [ResNet101Quantized.tflite](https://huggingface.co/qualcomm/ResNet101Quantized/blob/main/ResNet101Quantized.tflite) |
55
+ | ResNet101Quantized | SA8295P ADP | SA8295P | QNN | 2.255 ms | 0 - 6 MB | INT8 | NPU | Use Export Script |
56
+ | ResNet101Quantized | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 1.168 ms | 0 - 8 MB | INT8 | NPU | [ResNet101Quantized.tflite](https://huggingface.co/qualcomm/ResNet101Quantized/blob/main/ResNet101Quantized.tflite) |
57
+ | ResNet101Quantized | SA8650 (Proxy) | SA8650P Proxy | QNN | 1.327 ms | 0 - 1 MB | INT8 | NPU | Use Export Script |
58
+ | ResNet101Quantized | SA8775P ADP | SA8775P | TFLITE | 1.457 ms | 0 - 22 MB | INT8 | NPU | [ResNet101Quantized.tflite](https://huggingface.co/qualcomm/ResNet101Quantized/blob/main/ResNet101Quantized.tflite) |
59
+ | ResNet101Quantized | SA8775P ADP | SA8775P | QNN | 1.847 ms | 0 - 6 MB | INT8 | NPU | Use Export Script |
60
+ | ResNet101Quantized | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 1.364 ms | 0 - 38 MB | INT8 | NPU | [ResNet101Quantized.tflite](https://huggingface.co/qualcomm/ResNet101Quantized/blob/main/ResNet101Quantized.tflite) |
61
+ | ResNet101Quantized | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 1.583 ms | 0 - 24 MB | INT8 | NPU | Use Export Script |
62
+ | ResNet101Quantized | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 1.326 ms | 0 - 0 MB | INT8 | NPU | Use Export Script |
63
 
64
 
65
 
 
124
  Device : Samsung Galaxy S23 (13)
125
  Runtime : TFLITE
126
  Estimated inference time (ms) : 1.2
127
+ Estimated peak memory usage (MB): [0, 56]
128
  Total # Ops : 150
129
  Compute Unit(s) : NPU (150 ops)
130
  ```
 
145
  import torch
146
 
147
  import qai_hub as hub
148
+ from qai_hub_models.models.resnet101_quantized 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