qaihm-bot commited on
Commit
d99d2bc
1 Parent(s): 5bab5d6

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +34 -18
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.02 ms | 0 - 3 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.832 ms | 0 - 34 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 | 6.869 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 | 4.658 ms | 0 - 193 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 | 5.206 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.44 ms | 1 - 240 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 | 4.868 ms | 0 - 52 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.531 ms | 0 - 35 MB | FP16 | NPU | Use Export Script |
47
- | EfficientViT-b2-cls | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 4.721 ms | 0 - 70 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.06 ms | 0 - 2 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.48 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
50
- | EfficientViT-b2-cls | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 8.143 ms | 0 - 188 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.909 ms | 1 - 37 MB | FP16 | NPU | Use Export Script |
52
- | EfficientViT-b2-cls | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 7.943 ms | 1 - 1 MB | FP16 | NPU | Use Export Script |
53
- | EfficientViT-b2-cls | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 7.498 ms | 51 - 51 MB | FP16 | NPU | [EfficientViT-b2-cls.onnx](https://huggingface.co/qualcomm/EfficientViT-b2-cls/blob/main/EfficientViT-b2-cls.onnx) |
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.0
119
- Estimated peak memory usage (MB): [0, 3]
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