qaihm-bot commited on
Commit
9487a4a
·
verified ·
1 Parent(s): 8943c8c

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +34 -16
README.md CHANGED
@@ -36,20 +36,22 @@ 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
- | DenseNet-121-Quantized | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 1.752 ms | 0 - 10 MB | INT8 | NPU | [DenseNet-121-Quantized.so](https://huggingface.co/qualcomm/DenseNet-121-Quantized/blob/main/DenseNet-121-Quantized.so) |
40
- | DenseNet-121-Quantized | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 36.701 ms | 10 - 600 MB | INT8 | NPU | [DenseNet-121-Quantized.onnx](https://huggingface.co/qualcomm/DenseNet-121-Quantized/blob/main/DenseNet-121-Quantized.onnx) |
41
- | DenseNet-121-Quantized | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 1.224 ms | 0 - 22 MB | INT8 | NPU | [DenseNet-121-Quantized.so](https://huggingface.co/qualcomm/DenseNet-121-Quantized/blob/main/DenseNet-121-Quantized.so) |
42
- | DenseNet-121-Quantized | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 27.768 ms | 12 - 1043 MB | INT8 | NPU | [DenseNet-121-Quantized.onnx](https://huggingface.co/qualcomm/DenseNet-121-Quantized/blob/main/DenseNet-121-Quantized.onnx) |
43
- | DenseNet-121-Quantized | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 1.008 ms | 0 - 26 MB | INT8 | NPU | Use Export Script |
44
- | DenseNet-121-Quantized | RB3 Gen 2 (Proxy) | QCS6490 Proxy | QNN | 6.702 ms | 0 - 8 MB | INT8 | NPU | Use Export Script |
45
- | DenseNet-121-Quantized | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 1.67 ms | 0 - 1 MB | INT8 | NPU | Use Export Script |
46
- | DenseNet-121-Quantized | SA8255 (Proxy) | SA8255P Proxy | QNN | 1.668 ms | 0 - 2 MB | INT8 | NPU | Use Export Script |
47
- | DenseNet-121-Quantized | SA8775 (Proxy) | SA8775P Proxy | QNN | 1.671 ms | 0 - 1 MB | INT8 | NPU | Use Export Script |
48
- | DenseNet-121-Quantized | SA8650 (Proxy) | SA8650P Proxy | QNN | 1.671 ms | 0 - 1 MB | INT8 | NPU | Use Export Script |
49
- | DenseNet-121-Quantized | SA8295P ADP | SA8295P | QNN | 2.844 ms | 0 - 6 MB | INT8 | NPU | Use Export Script |
50
- | DenseNet-121-Quantized | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 2.124 ms | 0 - 26 MB | INT8 | NPU | Use Export Script |
51
- | DenseNet-121-Quantized | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 1.864 ms | 0 - 0 MB | INT8 | NPU | Use Export Script |
52
- | DenseNet-121-Quantized | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 39.197 ms | 46 - 46 MB | INT8 | NPU | [DenseNet-121-Quantized.onnx](https://huggingface.co/qualcomm/DenseNet-121-Quantized/blob/main/DenseNet-121-Quantized.onnx) |
 
 
53
 
54
 
55
 
@@ -114,7 +116,7 @@ DenseNet-121-Quantized
114
  Device : Samsung Galaxy S23 (13)
115
  Runtime : QNN
116
  Estimated inference time (ms) : 1.8
117
- Estimated peak memory usage (MB): [0, 10]
118
  Total # Ops : 215
119
  Compute Unit(s) : NPU (215 ops)
120
  ```
@@ -135,13 +137,29 @@ in memory using the `jit.trace` and then call the `submit_compile_job` API.
135
  import torch
136
 
137
  import qai_hub as hub
138
- from qai_hub_models.models.densenet121_quantized import
139
 
140
  # Load the model
 
141
 
142
  # Device
143
  device = hub.Device("Samsung Galaxy S23")
144
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
145
 
146
  ```
147
 
 
36
 
37
  | Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
38
  |---|---|---|---|---|---|---|---|---|
39
+ | DenseNet-121-Quantized | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 1.76 ms | 0 - 282 MB | INT8 | NPU | [DenseNet-121-Quantized.so](https://huggingface.co/qualcomm/DenseNet-121-Quantized/blob/main/DenseNet-121-Quantized.so) |
40
+ | DenseNet-121-Quantized | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 32.348 ms | 10 - 14 MB | INT8 | NPU | [DenseNet-121-Quantized.onnx](https://huggingface.co/qualcomm/DenseNet-121-Quantized/blob/main/DenseNet-121-Quantized.onnx) |
41
+ | DenseNet-121-Quantized | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 1.224 ms | 0 - 25 MB | INT8 | NPU | [DenseNet-121-Quantized.so](https://huggingface.co/qualcomm/DenseNet-121-Quantized/blob/main/DenseNet-121-Quantized.so) |
42
+ | DenseNet-121-Quantized | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 24.977 ms | 11 - 691 MB | INT8 | NPU | [DenseNet-121-Quantized.onnx](https://huggingface.co/qualcomm/DenseNet-121-Quantized/blob/main/DenseNet-121-Quantized.onnx) |
43
+ | DenseNet-121-Quantized | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 1.17 ms | 0 - 27 MB | INT8 | NPU | Use Export Script |
44
+ | DenseNet-121-Quantized | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 26.198 ms | 10 - 528 MB | INT8 | NPU | [DenseNet-121-Quantized.onnx](https://huggingface.co/qualcomm/DenseNet-121-Quantized/blob/main/DenseNet-121-Quantized.onnx) |
45
+ | DenseNet-121-Quantized | RB3 Gen 2 (Proxy) | QCS6490 Proxy | QNN | 6.682 ms | 0 - 8 MB | INT8 | NPU | Use Export Script |
46
+ | DenseNet-121-Quantized | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 1.694 ms | 0 - 1 MB | INT8 | NPU | Use Export Script |
47
+ | DenseNet-121-Quantized | SA7255P ADP | SA7255P | QNN | 15.021 ms | 0 - 6 MB | INT8 | NPU | Use Export Script |
48
+ | DenseNet-121-Quantized | SA8255 (Proxy) | SA8255P Proxy | QNN | 1.694 ms | 0 - 1 MB | INT8 | NPU | Use Export Script |
49
+ | DenseNet-121-Quantized | SA8295P ADP | SA8295P | QNN | 3.1 ms | 0 - 6 MB | INT8 | NPU | Use Export Script |
50
+ | DenseNet-121-Quantized | SA8650 (Proxy) | SA8650P Proxy | QNN | 1.696 ms | 0 - 2 MB | INT8 | NPU | Use Export Script |
51
+ | DenseNet-121-Quantized | SA8775P ADP | SA8775P | QNN | 2.437 ms | 0 - 5 MB | INT8 | NPU | Use Export Script |
52
+ | DenseNet-121-Quantized | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 2.162 ms | 0 - 25 MB | INT8 | NPU | Use Export Script |
53
+ | DenseNet-121-Quantized | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 1.851 ms | 0 - 0 MB | INT8 | NPU | Use Export Script |
54
+ | DenseNet-121-Quantized | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 34.379 ms | 29 - 29 MB | INT8 | NPU | [DenseNet-121-Quantized.onnx](https://huggingface.co/qualcomm/DenseNet-121-Quantized/blob/main/DenseNet-121-Quantized.onnx) |
55
 
56
 
57
 
 
116
  Device : Samsung Galaxy S23 (13)
117
  Runtime : QNN
118
  Estimated inference time (ms) : 1.8
119
+ Estimated peak memory usage (MB): [0, 282]
120
  Total # Ops : 215
121
  Compute Unit(s) : NPU (215 ops)
122
  ```
 
137
  import torch
138
 
139
  import qai_hub as hub
140
+ from qai_hub_models.models.densenet121_quantized import Model
141
 
142
  # Load the model
143
+ torch_model = Model.from_pretrained()
144
 
145
  # Device
146
  device = hub.Device("Samsung Galaxy S23")
147
 
148
+ # Trace model
149
+ input_shape = torch_model.get_input_spec()
150
+ sample_inputs = torch_model.sample_inputs()
151
+
152
+ pt_model = torch.jit.trace(torch_model, [torch.tensor(data[0]) for _, data in sample_inputs.items()])
153
+
154
+ # Compile model on a specific device
155
+ compile_job = hub.submit_compile_job(
156
+ model=pt_model,
157
+ device=device,
158
+ input_specs=torch_model.get_input_spec(),
159
+ )
160
+
161
+ # Get target model to run on-device
162
+ target_model = compile_job.get_target_model()
163
 
164
  ```
165