qaihm-bot commited on
Commit
ebaaf95
·
verified ·
1 Parent(s): f0893cb

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +42 -24
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
- | Inception-v3-Quantized | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 0.594 ms | 0 - 19 MB | INT8 | NPU | [Inception-v3-Quantized.tflite](https://huggingface.co/qualcomm/Inception-v3-Quantized/blob/main/Inception-v3-Quantized.tflite) |
40
- | Inception-v3-Quantized | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 0.65 ms | 0 - 101 MB | INT8 | NPU | [Inception-v3-Quantized.so](https://huggingface.co/qualcomm/Inception-v3-Quantized/blob/main/Inception-v3-Quantized.so) |
41
- | Inception-v3-Quantized | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 0.449 ms | 0 - 70 MB | INT8 | NPU | [Inception-v3-Quantized.tflite](https://huggingface.co/qualcomm/Inception-v3-Quantized/blob/main/Inception-v3-Quantized.tflite) |
42
- | Inception-v3-Quantized | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 0.504 ms | 0 - 18 MB | INT8 | NPU | [Inception-v3-Quantized.so](https://huggingface.co/qualcomm/Inception-v3-Quantized/blob/main/Inception-v3-Quantized.so) |
43
- | Inception-v3-Quantized | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 0.42 ms | 0 - 23 MB | INT8 | NPU | [Inception-v3-Quantized.tflite](https://huggingface.co/qualcomm/Inception-v3-Quantized/blob/main/Inception-v3-Quantized.tflite) |
44
- | Inception-v3-Quantized | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 0.489 ms | 0 - 16 MB | INT8 | NPU | Use Export Script |
45
- | Inception-v3-Quantized | RB3 Gen 2 (Proxy) | QCS6490 Proxy | TFLITE | 2.574 ms | 0 - 26 MB | INT8 | NPU | [Inception-v3-Quantized.tflite](https://huggingface.co/qualcomm/Inception-v3-Quantized/blob/main/Inception-v3-Quantized.tflite) |
46
- | Inception-v3-Quantized | RB3 Gen 2 (Proxy) | QCS6490 Proxy | QNN | 2.843 ms | 0 - 8 MB | INT8 | NPU | Use Export Script |
47
- | Inception-v3-Quantized | RB5 (Proxy) | QCS8250 Proxy | TFLITE | 7.776 ms | 0 - 2 MB | INT8 | NPU | [Inception-v3-Quantized.tflite](https://huggingface.co/qualcomm/Inception-v3-Quantized/blob/main/Inception-v3-Quantized.tflite) |
48
- | Inception-v3-Quantized | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 0.59 ms | 0 - 4 MB | INT8 | NPU | [Inception-v3-Quantized.tflite](https://huggingface.co/qualcomm/Inception-v3-Quantized/blob/main/Inception-v3-Quantized.tflite) |
49
- | Inception-v3-Quantized | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 0.655 ms | 0 - 1 MB | INT8 | NPU | Use Export Script |
50
- | Inception-v3-Quantized | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 0.59 ms | 0 - 14 MB | INT8 | NPU | [Inception-v3-Quantized.tflite](https://huggingface.co/qualcomm/Inception-v3-Quantized/blob/main/Inception-v3-Quantized.tflite) |
51
- | Inception-v3-Quantized | SA8255 (Proxy) | SA8255P Proxy | QNN | 0.653 ms | 0 - 2 MB | INT8 | NPU | Use Export Script |
52
- | Inception-v3-Quantized | SA8775 (Proxy) | SA8775P Proxy | TFLITE | 0.59 ms | 0 - 9 MB | INT8 | NPU | [Inception-v3-Quantized.tflite](https://huggingface.co/qualcomm/Inception-v3-Quantized/blob/main/Inception-v3-Quantized.tflite) |
53
- | Inception-v3-Quantized | SA8775 (Proxy) | SA8775P Proxy | QNN | 0.648 ms | 0 - 1 MB | INT8 | NPU | Use Export Script |
54
- | Inception-v3-Quantized | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 0.59 ms | 0 - 5 MB | INT8 | NPU | [Inception-v3-Quantized.tflite](https://huggingface.co/qualcomm/Inception-v3-Quantized/blob/main/Inception-v3-Quantized.tflite) |
55
- | Inception-v3-Quantized | SA8650 (Proxy) | SA8650P Proxy | QNN | 0.651 ms | 0 - 1 MB | INT8 | NPU | Use Export Script |
56
- | Inception-v3-Quantized | SA8295P ADP | SA8295P | TFLITE | 1.082 ms | 0 - 22 MB | INT8 | NPU | [Inception-v3-Quantized.tflite](https://huggingface.co/qualcomm/Inception-v3-Quantized/blob/main/Inception-v3-Quantized.tflite) |
57
- | Inception-v3-Quantized | SA8295P ADP | SA8295P | QNN | 1.31 ms | 0 - 6 MB | INT8 | NPU | Use Export Script |
58
- | Inception-v3-Quantized | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 0.713 ms | 0 - 70 MB | INT8 | NPU | [Inception-v3-Quantized.tflite](https://huggingface.co/qualcomm/Inception-v3-Quantized/blob/main/Inception-v3-Quantized.tflite) |
59
- | Inception-v3-Quantized | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 0.757 ms | 0 - 21 MB | INT8 | NPU | Use Export Script |
60
- | Inception-v3-Quantized | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 0.728 ms | 0 - 0 MB | INT8 | NPU | Use Export Script |
 
 
61
 
62
 
63
 
@@ -122,7 +124,7 @@ Inception-v3-Quantized
122
  Device : Samsung Galaxy S23 (13)
123
  Runtime : TFLITE
124
  Estimated inference time (ms) : 0.6
125
- Estimated peak memory usage (MB): [0, 19]
126
  Total # Ops : 142
127
  Compute Unit(s) : NPU (142 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.inception_v3_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
+ | Inception-v3-Quantized | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 0.639 ms | 0 - 230 MB | INT8 | NPU | [Inception-v3-Quantized.tflite](https://huggingface.co/qualcomm/Inception-v3-Quantized/blob/main/Inception-v3-Quantized.tflite) |
40
+ | Inception-v3-Quantized | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 0.651 ms | 0 - 27 MB | INT8 | NPU | [Inception-v3-Quantized.so](https://huggingface.co/qualcomm/Inception-v3-Quantized/blob/main/Inception-v3-Quantized.so) |
41
+ | Inception-v3-Quantized | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 0.454 ms | 0 - 15 MB | INT8 | NPU | [Inception-v3-Quantized.tflite](https://huggingface.co/qualcomm/Inception-v3-Quantized/blob/main/Inception-v3-Quantized.tflite) |
42
+ | Inception-v3-Quantized | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 0.503 ms | 0 - 17 MB | INT8 | NPU | [Inception-v3-Quantized.so](https://huggingface.co/qualcomm/Inception-v3-Quantized/blob/main/Inception-v3-Quantized.so) |
43
+ | Inception-v3-Quantized | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 0.45 ms | 0 - 16 MB | INT8 | NPU | [Inception-v3-Quantized.tflite](https://huggingface.co/qualcomm/Inception-v3-Quantized/blob/main/Inception-v3-Quantized.tflite) |
44
+ | Inception-v3-Quantized | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 0.486 ms | 0 - 15 MB | INT8 | NPU | Use Export Script |
45
+ | Inception-v3-Quantized | RB3 Gen 2 (Proxy) | QCS6490 Proxy | TFLITE | 2.443 ms | 0 - 25 MB | INT8 | NPU | [Inception-v3-Quantized.tflite](https://huggingface.co/qualcomm/Inception-v3-Quantized/blob/main/Inception-v3-Quantized.tflite) |
46
+ | Inception-v3-Quantized | RB3 Gen 2 (Proxy) | QCS6490 Proxy | QNN | 2.856 ms | 0 - 8 MB | INT8 | NPU | Use Export Script |
47
+ | Inception-v3-Quantized | RB5 (Proxy) | QCS8250 Proxy | TFLITE | 7.968 ms | 0 - 7 MB | INT8 | NPU | [Inception-v3-Quantized.tflite](https://huggingface.co/qualcomm/Inception-v3-Quantized/blob/main/Inception-v3-Quantized.tflite) |
48
+ | Inception-v3-Quantized | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 0.634 ms | 0 - 274 MB | INT8 | NPU | [Inception-v3-Quantized.tflite](https://huggingface.co/qualcomm/Inception-v3-Quantized/blob/main/Inception-v3-Quantized.tflite) |
49
+ | Inception-v3-Quantized | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 0.648 ms | 0 - 1 MB | INT8 | NPU | Use Export Script |
50
+ | Inception-v3-Quantized | SA7255P ADP | SA7255P | TFLITE | 8.425 ms | 0 - 17 MB | INT8 | NPU | [Inception-v3-Quantized.tflite](https://huggingface.co/qualcomm/Inception-v3-Quantized/blob/main/Inception-v3-Quantized.tflite) |
51
+ | Inception-v3-Quantized | SA7255P ADP | SA7255P | QNN | 8.737 ms | 0 - 5 MB | INT8 | NPU | Use Export Script |
52
+ | Inception-v3-Quantized | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 0.643 ms | 0 - 6 MB | INT8 | NPU | [Inception-v3-Quantized.tflite](https://huggingface.co/qualcomm/Inception-v3-Quantized/blob/main/Inception-v3-Quantized.tflite) |
53
+ | Inception-v3-Quantized | SA8255 (Proxy) | SA8255P Proxy | QNN | 0.652 ms | 0 - 2 MB | INT8 | NPU | Use Export Script |
54
+ | Inception-v3-Quantized | SA8295P ADP | SA8295P | TFLITE | 1.13 ms | 0 - 16 MB | INT8 | NPU | [Inception-v3-Quantized.tflite](https://huggingface.co/qualcomm/Inception-v3-Quantized/blob/main/Inception-v3-Quantized.tflite) |
55
+ | Inception-v3-Quantized | SA8295P ADP | SA8295P | QNN | 1.44 ms | 0 - 6 MB | INT8 | NPU | Use Export Script |
56
+ | Inception-v3-Quantized | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 0.642 ms | 0 - 220 MB | INT8 | NPU | [Inception-v3-Quantized.tflite](https://huggingface.co/qualcomm/Inception-v3-Quantized/blob/main/Inception-v3-Quantized.tflite) |
57
+ | Inception-v3-Quantized | SA8650 (Proxy) | SA8650P Proxy | QNN | 0.652 ms | 0 - 1 MB | INT8 | NPU | Use Export Script |
58
+ | Inception-v3-Quantized | SA8775P ADP | SA8775P | TFLITE | 0.956 ms | 0 - 17 MB | INT8 | NPU | [Inception-v3-Quantized.tflite](https://huggingface.co/qualcomm/Inception-v3-Quantized/blob/main/Inception-v3-Quantized.tflite) |
59
+ | Inception-v3-Quantized | SA8775P ADP | SA8775P | QNN | 1.151 ms | 0 - 6 MB | INT8 | NPU | Use Export Script |
60
+ | Inception-v3-Quantized | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 0.77 ms | 0 - 22 MB | INT8 | NPU | [Inception-v3-Quantized.tflite](https://huggingface.co/qualcomm/Inception-v3-Quantized/blob/main/Inception-v3-Quantized.tflite) |
61
+ | Inception-v3-Quantized | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 0.761 ms | 0 - 21 MB | INT8 | NPU | Use Export Script |
62
+ | Inception-v3-Quantized | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 0.724 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) : 0.6
127
+ Estimated peak memory usage (MB): [0, 230]
128
  Total # Ops : 142
129
  Compute Unit(s) : NPU (142 ops)
130
  ```
 
145
  import torch
146
 
147
  import qai_hub as hub
148
+ from qai_hub_models.models.inception_v3_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