bhushans commited on
Commit
3f73005
·
verified ·
1 Parent(s): b55d2c5

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +41 -25
README.md CHANGED
@@ -34,29 +34,29 @@ More details on model performance across various devices, can be found
34
 
35
  | Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
36
  |---|---|---|---|---|---|---|---|---|
37
- | XLSR | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 2.476 ms | 1 - 9 MB | FP16 | NPU | [XLSR.tflite](https://huggingface.co/qualcomm/XLSR/blob/main/XLSR.tflite) |
38
- | XLSR | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 1.36 ms | 0 - 65 MB | FP16 | NPU | [XLSR.so](https://huggingface.co/qualcomm/XLSR/blob/main/XLSR.so) |
39
- | XLSR | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 1.504 ms | 0 - 1 MB | FP16 | NPU | [XLSR.onnx](https://huggingface.co/qualcomm/XLSR/blob/main/XLSR.onnx) |
40
- | XLSR | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 1.692 ms | 0 - 24 MB | FP16 | NPU | [XLSR.tflite](https://huggingface.co/qualcomm/XLSR/blob/main/XLSR.tflite) |
41
- | XLSR | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 0.827 ms | 0 - 10 MB | FP16 | NPU | [XLSR.so](https://huggingface.co/qualcomm/XLSR/blob/main/XLSR.so) |
42
- | XLSR | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 1.044 ms | 0 - 23 MB | FP16 | NPU | [XLSR.onnx](https://huggingface.co/qualcomm/XLSR/blob/main/XLSR.onnx) |
43
- | XLSR | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 1.553 ms | 0 - 16 MB | FP16 | NPU | [XLSR.tflite](https://huggingface.co/qualcomm/XLSR/blob/main/XLSR.tflite) |
44
- | XLSR | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 0.792 ms | 0 - 9 MB | FP16 | NPU | Use Export Script |
45
- | XLSR | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 1.067 ms | 0 - 14 MB | FP16 | NPU | [XLSR.onnx](https://huggingface.co/qualcomm/XLSR/blob/main/XLSR.onnx) |
46
- | XLSR | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 2.538 ms | 0 - 8 MB | FP16 | NPU | [XLSR.tflite](https://huggingface.co/qualcomm/XLSR/blob/main/XLSR.tflite) |
47
- | XLSR | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 1.339 ms | 0 - 2 MB | FP16 | NPU | Use Export Script |
48
- | XLSR | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 2.515 ms | 0 - 8 MB | FP16 | NPU | [XLSR.tflite](https://huggingface.co/qualcomm/XLSR/blob/main/XLSR.tflite) |
49
- | XLSR | SA8255 (Proxy) | SA8255P Proxy | QNN | 1.332 ms | 0 - 1 MB | FP16 | NPU | Use Export Script |
50
- | XLSR | SA8775 (Proxy) | SA8775P Proxy | TFLITE | 2.607 ms | 0 - 1 MB | FP16 | NPU | [XLSR.tflite](https://huggingface.co/qualcomm/XLSR/blob/main/XLSR.tflite) |
51
- | XLSR | SA8775 (Proxy) | SA8775P Proxy | QNN | 1.353 ms | 0 - 1 MB | FP16 | NPU | Use Export Script |
52
- | XLSR | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 2.586 ms | 0 - 9 MB | FP16 | NPU | [XLSR.tflite](https://huggingface.co/qualcomm/XLSR/blob/main/XLSR.tflite) |
53
- | XLSR | SA8650 (Proxy) | SA8650P Proxy | QNN | 1.355 ms | 0 - 1 MB | FP16 | NPU | Use Export Script |
54
- | XLSR | SA8295P ADP | SA8295P | TFLITE | 3.916 ms | 6 - 21 MB | FP16 | NPU | [XLSR.tflite](https://huggingface.co/qualcomm/XLSR/blob/main/XLSR.tflite) |
55
- | XLSR | SA8295P ADP | SA8295P | QNN | 2.328 ms | 0 - 6 MB | FP16 | NPU | Use Export Script |
56
- | XLSR | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 3.326 ms | 6 - 31 MB | FP16 | NPU | [XLSR.tflite](https://huggingface.co/qualcomm/XLSR/blob/main/XLSR.tflite) |
57
- | XLSR | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 1.553 ms | 0 - 14 MB | FP16 | NPU | Use Export Script |
58
- | XLSR | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 1.523 ms | 0 - 0 MB | FP16 | NPU | Use Export Script |
59
- | XLSR | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 1.535 ms | 8 - 8 MB | FP16 | NPU | [XLSR.onnx](https://huggingface.co/qualcomm/XLSR/blob/main/XLSR.onnx) |
60
 
61
 
62
 
@@ -121,7 +121,7 @@ XLSR
121
  Device : Samsung Galaxy S23 (13)
122
  Runtime : TFLITE
123
  Estimated inference time (ms) : 2.5
124
- Estimated peak memory usage (MB): [1, 9]
125
  Total # Ops : 16
126
  Compute Unit(s) : NPU (13 ops) CPU (3 ops)
127
  ```
@@ -142,13 +142,29 @@ in memory using the `jit.trace` and then call the `submit_compile_job` API.
142
  import torch
143
 
144
  import qai_hub as hub
145
- from qai_hub_models.models.xlsr import
146
 
147
  # Load the model
 
148
 
149
  # Device
150
  device = hub.Device("Samsung Galaxy S23")
151
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
152
 
153
  ```
154
 
 
34
 
35
  | Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
36
  |---|---|---|---|---|---|---|---|---|
37
+ | XLSR | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 2.542 ms | 0 - 3 MB | FP16 | NPU | [XLSR.tflite](https://huggingface.co/qualcomm/XLSR/blob/main/XLSR.tflite) |
38
+ | XLSR | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 0.965 ms | 0 - 14 MB | FP16 | NPU | [XLSR.so](https://huggingface.co/qualcomm/XLSR/blob/main/XLSR.so) |
39
+ | XLSR | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 1.458 ms | 0 - 2 MB | FP16 | NPU | [XLSR.onnx](https://huggingface.co/qualcomm/XLSR/blob/main/XLSR.onnx) |
40
+ | XLSR | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 1.743 ms | 0 - 12 MB | FP16 | NPU | [XLSR.tflite](https://huggingface.co/qualcomm/XLSR/blob/main/XLSR.tflite) |
41
+ | XLSR | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 0.623 ms | 0 - 9 MB | FP16 | NPU | [XLSR.so](https://huggingface.co/qualcomm/XLSR/blob/main/XLSR.so) |
42
+ | XLSR | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 1.069 ms | 0 - 23 MB | FP16 | NPU | [XLSR.onnx](https://huggingface.co/qualcomm/XLSR/blob/main/XLSR.onnx) |
43
+ | XLSR | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 1.961 ms | 0 - 8 MB | FP16 | NPU | [XLSR.tflite](https://huggingface.co/qualcomm/XLSR/blob/main/XLSR.tflite) |
44
+ | XLSR | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 0.665 ms | 0 - 9 MB | FP16 | NPU | Use Export Script |
45
+ | XLSR | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 1.069 ms | 0 - 15 MB | FP16 | NPU | [XLSR.onnx](https://huggingface.co/qualcomm/XLSR/blob/main/XLSR.onnx) |
46
+ | XLSR | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 2.447 ms | 0 - 3 MB | FP16 | NPU | [XLSR.tflite](https://huggingface.co/qualcomm/XLSR/blob/main/XLSR.tflite) |
47
+ | XLSR | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 0.875 ms | 0 - 1 MB | FP16 | NPU | Use Export Script |
48
+ | XLSR | SA7255P ADP | SA7255P | TFLITE | 17.003 ms | 6 - 16 MB | FP16 | NPU | [XLSR.tflite](https://huggingface.co/qualcomm/XLSR/blob/main/XLSR.tflite) |
49
+ | XLSR | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 2.709 ms | 6 - 81 MB | FP16 | NPU | [XLSR.tflite](https://huggingface.co/qualcomm/XLSR/blob/main/XLSR.tflite) |
50
+ | XLSR | SA8255 (Proxy) | SA8255P Proxy | QNN | 0.901 ms | 0 - 1 MB | FP16 | NPU | Use Export Script |
51
+ | XLSR | SA8295P ADP | SA8295P | TFLITE | 3.956 ms | 0 - 8 MB | FP16 | NPU | [XLSR.tflite](https://huggingface.co/qualcomm/XLSR/blob/main/XLSR.tflite) |
52
+ | XLSR | SA8295P ADP | SA8295P | QNN | 2.212 ms | 0 - 6 MB | FP16 | NPU | Use Export Script |
53
+ | XLSR | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 2.446 ms | 0 - 3 MB | FP16 | NPU | [XLSR.tflite](https://huggingface.co/qualcomm/XLSR/blob/main/XLSR.tflite) |
54
+ | XLSR | SA8650 (Proxy) | SA8650P Proxy | QNN | 0.897 ms | 0 - 1 MB | FP16 | NPU | Use Export Script |
55
+ | XLSR | SA8775P ADP | SA8775P | TFLITE | 4.206 ms | 6 - 14 MB | FP16 | NPU | [XLSR.tflite](https://huggingface.co/qualcomm/XLSR/blob/main/XLSR.tflite) |
56
+ | XLSR | SA8775P ADP | SA8775P | QNN | 1.851 ms | 0 - 6 MB | FP16 | NPU | Use Export Script |
57
+ | XLSR | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 3.689 ms | 6 - 18 MB | FP16 | NPU | [XLSR.tflite](https://huggingface.co/qualcomm/XLSR/blob/main/XLSR.tflite) |
58
+ | XLSR | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 1.305 ms | 0 - 12 MB | FP16 | NPU | Use Export Script |
59
+ | XLSR | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 0.982 ms | 0 - 0 MB | FP16 | NPU | Use Export Script |
60
 
61
 
62
 
 
121
  Device : Samsung Galaxy S23 (13)
122
  Runtime : TFLITE
123
  Estimated inference time (ms) : 2.5
124
+ Estimated peak memory usage (MB): [0, 3]
125
  Total # Ops : 16
126
  Compute Unit(s) : NPU (13 ops) CPU (3 ops)
127
  ```
 
142
  import torch
143
 
144
  import qai_hub as hub
145
+ from qai_hub_models.models.xlsr import Model
146
 
147
  # Load the model
148
+ torch_model = Model.from_pretrained()
149
 
150
  # Device
151
  device = hub.Device("Samsung Galaxy S23")
152
 
153
+ # Trace model
154
+ input_shape = torch_model.get_input_spec()
155
+ sample_inputs = torch_model.sample_inputs()
156
+
157
+ pt_model = torch.jit.trace(torch_model, [torch.tensor(data[0]) for _, data in sample_inputs.items()])
158
+
159
+ # Compile model on a specific device
160
+ compile_job = hub.submit_compile_job(
161
+ model=pt_model,
162
+ device=device,
163
+ input_specs=torch_model.get_input_spec(),
164
+ )
165
+
166
+ # Get target model to run on-device
167
+ target_model = compile_job.get_target_model()
168
 
169
  ```
170