Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
@@ -36,21 +36,21 @@ 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 |
-
| EfficientViT-b2-cls | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 7.
|
40 |
-
| EfficientViT-b2-cls | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 7.
|
41 |
-
| EfficientViT-b2-cls | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX |
|
42 |
-
| EfficientViT-b2-cls | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE |
|
43 |
-
| EfficientViT-b2-cls | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN |
|
44 |
-
| EfficientViT-b2-cls | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 4.
|
45 |
-
| EfficientViT-b2-cls | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE |
|
46 |
-
| EfficientViT-b2-cls | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 4.
|
47 |
-
| EfficientViT-b2-cls | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX |
|
48 |
-
| EfficientViT-b2-cls | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 7.
|
49 |
-
| EfficientViT-b2-cls | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 7.
|
50 |
-
| EfficientViT-b2-cls | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE |
|
51 |
-
| EfficientViT-b2-cls | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 8.
|
52 |
-
| EfficientViT-b2-cls | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 7.
|
53 |
-
| EfficientViT-b2-cls | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 7.
|
54 |
|
55 |
|
56 |
|
@@ -115,8 +115,8 @@ Profiling Results
|
|
115 |
EfficientViT-b2-cls
|
116 |
Device : Samsung Galaxy S23 (13)
|
117 |
Runtime : TFLITE
|
118 |
-
Estimated inference time (ms) : 7.
|
119 |
-
Estimated peak memory usage (MB): [0,
|
120 |
Total # Ops : 379
|
121 |
Compute Unit(s) : NPU (379 ops)
|
122 |
```
|
@@ -137,13 +137,29 @@ in memory using the `jit.trace` and then call the `submit_compile_job` API.
|
|
137 |
import torch
|
138 |
|
139 |
import qai_hub as hub
|
140 |
-
from qai_hub_models.models.efficientvit_b2_cls import
|
141 |
|
142 |
# Load the model
|
|
|
143 |
|
144 |
# Device
|
145 |
device = hub.Device("Samsung Galaxy S23")
|
146 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
|
148 |
```
|
149 |
|
|
|
36 |
|
37 |
| Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
|
38 |
|---|---|---|---|---|---|---|---|---|
|
39 |
+
| EfficientViT-b2-cls | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 7.746 ms | 0 - 82 MB | FP16 | NPU | [EfficientViT-b2-cls.tflite](https://huggingface.co/qualcomm/EfficientViT-b2-cls/blob/main/EfficientViT-b2-cls.tflite) |
|
40 |
+
| EfficientViT-b2-cls | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 7.52 ms | 0 - 184 MB | FP16 | NPU | [EfficientViT-b2-cls.so](https://huggingface.co/qualcomm/EfficientViT-b2-cls/blob/main/EfficientViT-b2-cls.so) |
|
41 |
+
| EfficientViT-b2-cls | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 7.058 ms | 0 - 58 MB | FP16 | NPU | [EfficientViT-b2-cls.onnx](https://huggingface.co/qualcomm/EfficientViT-b2-cls/blob/main/EfficientViT-b2-cls.onnx) |
|
42 |
+
| EfficientViT-b2-cls | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 5.236 ms | 0 - 32 MB | FP16 | NPU | [EfficientViT-b2-cls.tflite](https://huggingface.co/qualcomm/EfficientViT-b2-cls/blob/main/EfficientViT-b2-cls.tflite) |
|
43 |
+
| EfficientViT-b2-cls | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 4.975 ms | 1 - 36 MB | FP16 | NPU | [EfficientViT-b2-cls.so](https://huggingface.co/qualcomm/EfficientViT-b2-cls/blob/main/EfficientViT-b2-cls.so) |
|
44 |
+
| EfficientViT-b2-cls | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 4.858 ms | 0 - 185 MB | FP16 | NPU | [EfficientViT-b2-cls.onnx](https://huggingface.co/qualcomm/EfficientViT-b2-cls/blob/main/EfficientViT-b2-cls.onnx) |
|
45 |
+
| EfficientViT-b2-cls | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 5.209 ms | 0 - 35 MB | FP16 | NPU | [EfficientViT-b2-cls.tflite](https://huggingface.co/qualcomm/EfficientViT-b2-cls/blob/main/EfficientViT-b2-cls.tflite) |
|
46 |
+
| EfficientViT-b2-cls | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 4.338 ms | 1 - 34 MB | FP16 | NPU | Use Export Script |
|
47 |
+
| EfficientViT-b2-cls | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 3.846 ms | 0 - 55 MB | FP16 | NPU | [EfficientViT-b2-cls.onnx](https://huggingface.co/qualcomm/EfficientViT-b2-cls/blob/main/EfficientViT-b2-cls.onnx) |
|
48 |
+
| EfficientViT-b2-cls | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 7.625 ms | 0 - 242 MB | FP16 | NPU | [EfficientViT-b2-cls.tflite](https://huggingface.co/qualcomm/EfficientViT-b2-cls/blob/main/EfficientViT-b2-cls.tflite) |
|
49 |
+
| EfficientViT-b2-cls | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 7.18 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
|
50 |
+
| EfficientViT-b2-cls | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 9.027 ms | 0 - 34 MB | FP16 | NPU | [EfficientViT-b2-cls.tflite](https://huggingface.co/qualcomm/EfficientViT-b2-cls/blob/main/EfficientViT-b2-cls.tflite) |
|
51 |
+
| EfficientViT-b2-cls | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 8.624 ms | 0 - 35 MB | FP16 | NPU | Use Export Script |
|
52 |
+
| EfficientViT-b2-cls | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 7.69 ms | 1 - 1 MB | FP16 | NPU | Use Export Script |
|
53 |
+
| EfficientViT-b2-cls | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 7.938 ms | 50 - 50 MB | FP16 | NPU | [EfficientViT-b2-cls.onnx](https://huggingface.co/qualcomm/EfficientViT-b2-cls/blob/main/EfficientViT-b2-cls.onnx) |
|
54 |
|
55 |
|
56 |
|
|
|
115 |
EfficientViT-b2-cls
|
116 |
Device : Samsung Galaxy S23 (13)
|
117 |
Runtime : TFLITE
|
118 |
+
Estimated inference time (ms) : 7.7
|
119 |
+
Estimated peak memory usage (MB): [0, 82]
|
120 |
Total # Ops : 379
|
121 |
Compute Unit(s) : NPU (379 ops)
|
122 |
```
|
|
|
137 |
import torch
|
138 |
|
139 |
import qai_hub as hub
|
140 |
+
from qai_hub_models.models.efficientvit_b2_cls 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 |
|