qaihm-bot commited on
Commit
da3620d
·
verified ·
1 Parent(s): e6657a4

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +87 -87
README.md CHANGED
@@ -38,56 +38,56 @@ More details on model performance across various devices, can be found
38
 
39
  | Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
40
  |---|---|---|---|---|---|---|---|---|
41
- | WhisperEncoder | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 199.951 ms | 0 - 81 MB | FP16 | GPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperEncoder.tflite) |
42
- | WhisperEncoder | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 269.428 ms | 0 - 81 MB | FP16 | NPU | [Whisper-Base-En.so](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperEncoder.so) |
43
- | WhisperEncoder | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 272.557 ms | 61 - 119 MB | FP16 | NPU | [Whisper-Base-En.onnx](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperEncoder.onnx) |
44
- | WhisperEncoder | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 153.295 ms | 37 - 75 MB | FP16 | GPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperEncoder.tflite) |
45
- | WhisperEncoder | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 184.254 ms | 0 - 290 MB | FP16 | NPU | [Whisper-Base-En.so](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperEncoder.so) |
46
- | WhisperEncoder | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 206.768 ms | 40 - 929 MB | FP16 | NPU | [Whisper-Base-En.onnx](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperEncoder.onnx) |
47
- | WhisperEncoder | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 145.127 ms | 37 - 57 MB | FP16 | GPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperEncoder.tflite) |
48
- | WhisperEncoder | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 173.991 ms | 0 - 304 MB | FP16 | NPU | Use Export Script |
49
- | WhisperEncoder | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 181.021 ms | 95 - 638 MB | FP16 | NPU | [Whisper-Base-En.onnx](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperEncoder.onnx) |
50
- | WhisperEncoder | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 197.727 ms | 0 - 77 MB | FP16 | GPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperEncoder.tflite) |
51
- | WhisperEncoder | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 205.013 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
52
- | WhisperEncoder | SA7255P ADP | SA7255P | TFLITE | 1157.378 ms | 37 - 63 MB | FP16 | GPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperEncoder.tflite) |
53
- | WhisperEncoder | SA7255P ADP | SA7255P | QNN | 935.22 ms | 1 - 8 MB | FP16 | NPU | Use Export Script |
54
- | WhisperEncoder | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 196.948 ms | 0 - 109 MB | FP16 | GPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperEncoder.tflite) |
55
- | WhisperEncoder | SA8255 (Proxy) | SA8255P Proxy | QNN | 220.231 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
56
- | WhisperEncoder | SA8295P ADP | SA8295P | TFLITE | 205.03 ms | 38 - 63 MB | FP16 | GPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperEncoder.tflite) |
57
- | WhisperEncoder | SA8295P ADP | SA8295P | QNN | 219.872 ms | 1 - 6 MB | FP16 | NPU | Use Export Script |
58
- | WhisperEncoder | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 198.057 ms | 0 - 79 MB | FP16 | GPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperEncoder.tflite) |
59
- | WhisperEncoder | SA8650 (Proxy) | SA8650P Proxy | QNN | 202.554 ms | 0 - 20 MB | FP16 | NPU | Use Export Script |
60
- | WhisperEncoder | SA8775P ADP | SA8775P | TFLITE | 366.822 ms | 38 - 63 MB | FP16 | GPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperEncoder.tflite) |
61
- | WhisperEncoder | SA8775P ADP | SA8775P | QNN | 194.703 ms | 1 - 6 MB | FP16 | NPU | Use Export Script |
62
- | WhisperEncoder | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 324.843 ms | 12 - 56 MB | FP16 | GPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperEncoder.tflite) |
63
- | WhisperEncoder | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 272.669 ms | 0 - 299 MB | FP16 | NPU | Use Export Script |
64
- | WhisperEncoder | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 159.232 ms | 0 - 0 MB | FP16 | NPU | Use Export Script |
65
- | WhisperEncoder | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 297.71 ms | 133 - 133 MB | FP16 | NPU | [Whisper-Base-En.onnx](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperEncoder.onnx) |
66
- | WhisperDecoder | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 38.364 ms | 3 - 41 MB | FP16 | NPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperDecoder.tflite) |
67
- | WhisperDecoder | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 4.236 ms | 20 - 65 MB | FP16 | NPU | [Whisper-Base-En.so](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperDecoder.so) |
68
- | WhisperDecoder | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 16.021 ms | 0 - 117 MB | FP16 | NPU | [Whisper-Base-En.onnx](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperDecoder.onnx) |
69
- | WhisperDecoder | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 30.646 ms | 0 - 76 MB | FP16 | NPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperDecoder.tflite) |
70
- | WhisperDecoder | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 3.339 ms | 0 - 51 MB | FP16 | NPU | [Whisper-Base-En.so](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperDecoder.so) |
71
- | WhisperDecoder | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 13.615 ms | 53 - 277 MB | FP16 | NPU | [Whisper-Base-En.onnx](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperDecoder.onnx) |
72
- | WhisperDecoder | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 26.759 ms | 4 - 75 MB | FP16 | NPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperDecoder.tflite) |
73
- | WhisperDecoder | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 2.558 ms | 20 - 69 MB | FP16 | NPU | Use Export Script |
74
- | WhisperDecoder | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 12.032 ms | 28 - 229 MB | FP16 | NPU | [Whisper-Base-En.onnx](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperDecoder.onnx) |
75
- | WhisperDecoder | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 38.53 ms | 0 - 39 MB | FP16 | NPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperDecoder.tflite) |
76
- | WhisperDecoder | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 4.204 ms | 20 - 22 MB | FP16 | NPU | Use Export Script |
77
- | WhisperDecoder | SA7255P ADP | SA7255P | TFLITE | 68.01 ms | 3 - 74 MB | FP16 | NPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperDecoder.tflite) |
78
- | WhisperDecoder | SA7255P ADP | SA7255P | QNN | 26.944 ms | 20 - 26 MB | FP16 | NPU | Use Export Script |
79
- | WhisperDecoder | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 38.528 ms | 6 - 44 MB | FP16 | NPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperDecoder.tflite) |
80
- | WhisperDecoder | SA8255 (Proxy) | SA8255P Proxy | QNN | 4.237 ms | 20 - 22 MB | FP16 | NPU | Use Export Script |
81
- | WhisperDecoder | SA8295P ADP | SA8295P | TFLITE | 41.065 ms | 6 - 70 MB | FP16 | NPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperDecoder.tflite) |
82
- | WhisperDecoder | SA8295P ADP | SA8295P | QNN | 5.798 ms | 18 - 23 MB | FP16 | NPU | Use Export Script |
83
- | WhisperDecoder | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 38.144 ms | 4 - 40 MB | FP16 | NPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperDecoder.tflite) |
84
- | WhisperDecoder | SA8650 (Proxy) | SA8650P Proxy | QNN | 4.157 ms | 21 - 22 MB | FP16 | NPU | Use Export Script |
85
- | WhisperDecoder | SA8775P ADP | SA8775P | TFLITE | 38.291 ms | 5 - 76 MB | FP16 | NPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperDecoder.tflite) |
86
- | WhisperDecoder | SA8775P ADP | SA8775P | QNN | 5.574 ms | 18 - 23 MB | FP16 | NPU | Use Export Script |
87
- | WhisperDecoder | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 43.741 ms | 2 - 77 MB | FP16 | NPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperDecoder.tflite) |
88
- | WhisperDecoder | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 5.068 ms | 18 - 66 MB | FP16 | NPU | Use Export Script |
89
- | WhisperDecoder | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 3.805 ms | 20 - 20 MB | FP16 | NPU | Use Export Script |
90
- | WhisperDecoder | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 14.392 ms | 107 - 107 MB | FP16 | NPU | [Whisper-Base-En.onnx](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperDecoder.onnx) |
91
 
92
 
93
 
@@ -148,23 +148,23 @@ python -m qai_hub_models.models.whisper_base_en.export
148
  ```
149
  ```
150
  Profiling Results
151
- ------------------------------------------------------------
152
- WhisperEncoder
153
- Device : Samsung Galaxy S23 (13)
154
- Runtime : TFLITE
155
- Estimated inference time (ms) : 200.0
156
- Estimated peak memory usage (MB): [0, 81]
157
- Total # Ops : 419
158
- Compute Unit(s) : GPU (408 ops) CPU (11 ops)
159
-
160
  ------------------------------------------------------------
161
  WhisperDecoder
162
  Device : Samsung Galaxy S23 (13)
163
  Runtime : TFLITE
164
- Estimated inference time (ms) : 38.4
165
- Estimated peak memory usage (MB): [3, 41]
166
  Total # Ops : 983
167
  Compute Unit(s) : NPU (983 ops)
 
 
 
 
 
 
 
 
 
168
  ```
169
 
170
 
@@ -187,42 +187,42 @@ from qai_hub_models.models.whisper_base_en import Model
187
 
188
  # Load the model
189
  model = Model.from_pretrained()
190
- encoder_model = model.encoder
191
  decoder_model = model.decoder
 
192
 
193
  # Device
194
  device = hub.Device("Samsung Galaxy S23")
195
 
196
  # Trace model
197
- encoder_input_shape = encoder_model.get_input_spec()
198
- encoder_sample_inputs = encoder_model.sample_inputs()
199
 
200
- traced_encoder_model = torch.jit.trace(encoder_model, [torch.tensor(data[0]) for _, data in encoder_sample_inputs.items()])
201
 
202
  # Compile model on a specific device
203
- encoder_compile_job = hub.submit_compile_job(
204
- model=traced_encoder_model ,
205
  device=device,
206
- input_specs=encoder_model.get_input_spec(),
207
  )
208
 
209
  # Get target model to run on-device
210
- encoder_target_model = encoder_compile_job.get_target_model()
211
  # Trace model
212
- decoder_input_shape = decoder_model.get_input_spec()
213
- decoder_sample_inputs = decoder_model.sample_inputs()
214
 
215
- traced_decoder_model = torch.jit.trace(decoder_model, [torch.tensor(data[0]) for _, data in decoder_sample_inputs.items()])
216
 
217
  # Compile model on a specific device
218
- decoder_compile_job = hub.submit_compile_job(
219
- model=traced_decoder_model ,
220
  device=device,
221
- input_specs=decoder_model.get_input_spec(),
222
  )
223
 
224
  # Get target model to run on-device
225
- decoder_target_model = decoder_compile_job.get_target_model()
226
 
227
  ```
228
 
@@ -234,14 +234,14 @@ After compiling models from step 1. Models can be profiled model on-device using
234
  provisioned in the cloud. Once the job is submitted, you can navigate to a
235
  provided job URL to view a variety of on-device performance metrics.
236
  ```python
237
- encoder_profile_job = hub.submit_profile_job(
238
- model=encoder_target_model,
239
- device=device,
240
- )
241
  decoder_profile_job = hub.submit_profile_job(
242
  model=decoder_target_model,
243
  device=device,
244
  )
 
 
 
 
245
 
246
  ```
247
 
@@ -250,13 +250,6 @@ Step 3: **Verify on-device accuracy**
250
  To verify the accuracy of the model on-device, you can run on-device inference
251
  on sample input data on the same cloud hosted device.
252
  ```python
253
- encoder_input_data = encoder_model.sample_inputs()
254
- encoder_inference_job = hub.submit_inference_job(
255
- model=encoder_target_model,
256
- device=device,
257
- inputs=encoder_input_data,
258
- )
259
- encoder_inference_job.download_output_data()
260
  decoder_input_data = decoder_model.sample_inputs()
261
  decoder_inference_job = hub.submit_inference_job(
262
  model=decoder_target_model,
@@ -264,6 +257,13 @@ decoder_inference_job = hub.submit_inference_job(
264
  inputs=decoder_input_data,
265
  )
266
  decoder_inference_job.download_output_data()
 
 
 
 
 
 
 
267
 
268
  ```
269
  With the output of the model, you can compute like PSNR, relative errors or
 
38
 
39
  | Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
40
  |---|---|---|---|---|---|---|---|---|
41
+ | WhisperDecoder | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 37.916 ms | 5 - 43 MB | FP16 | NPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperDecoder.tflite) |
42
+ | WhisperDecoder | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 4.223 ms | 20 - 63 MB | FP16 | NPU | [Whisper-Base-En.so](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperDecoder.so) |
43
+ | WhisperDecoder | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 15.843 ms | 0 - 116 MB | FP16 | NPU | [Whisper-Base-En.onnx](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperDecoder.onnx) |
44
+ | WhisperDecoder | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 32.58 ms | 4 - 82 MB | FP16 | NPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperDecoder.tflite) |
45
+ | WhisperDecoder | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 3.296 ms | 20 - 75 MB | FP16 | NPU | [Whisper-Base-En.so](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperDecoder.so) |
46
+ | WhisperDecoder | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 13.657 ms | 0 - 222 MB | FP16 | NPU | [Whisper-Base-En.onnx](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperDecoder.onnx) |
47
+ | WhisperDecoder | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 27.503 ms | 4 - 76 MB | FP16 | NPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperDecoder.tflite) |
48
+ | WhisperDecoder | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 2.646 ms | 9 - 59 MB | FP16 | NPU | Use Export Script |
49
+ | WhisperDecoder | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 12.074 ms | 6 - 203 MB | FP16 | NPU | [Whisper-Base-En.onnx](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperDecoder.onnx) |
50
+ | WhisperDecoder | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 38.524 ms | 6 - 42 MB | FP16 | NPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperDecoder.tflite) |
51
+ | WhisperDecoder | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 4.167 ms | 19 - 20 MB | FP16 | NPU | Use Export Script |
52
+ | WhisperDecoder | SA7255P ADP | SA7255P | TFLITE | 67.034 ms | 4 - 76 MB | FP16 | NPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperDecoder.tflite) |
53
+ | WhisperDecoder | SA7255P ADP | SA7255P | QNN | 26.93 ms | 9 - 19 MB | FP16 | NPU | Use Export Script |
54
+ | WhisperDecoder | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 38.064 ms | 6 - 42 MB | FP16 | NPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperDecoder.tflite) |
55
+ | WhisperDecoder | SA8255 (Proxy) | SA8255P Proxy | QNN | 4.245 ms | 19 - 20 MB | FP16 | NPU | Use Export Script |
56
+ | WhisperDecoder | SA8295P ADP | SA8295P | TFLITE | 40.976 ms | 2 - 67 MB | FP16 | NPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperDecoder.tflite) |
57
+ | WhisperDecoder | SA8295P ADP | SA8295P | QNN | 5.535 ms | 18 - 24 MB | FP16 | NPU | Use Export Script |
58
+ | WhisperDecoder | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 38.218 ms | 6 - 43 MB | FP16 | NPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperDecoder.tflite) |
59
+ | WhisperDecoder | SA8650 (Proxy) | SA8650P Proxy | QNN | 4.172 ms | 20 - 22 MB | FP16 | NPU | Use Export Script |
60
+ | WhisperDecoder | SA8775P ADP | SA8775P | TFLITE | 38.342 ms | 5 - 77 MB | FP16 | NPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperDecoder.tflite) |
61
+ | WhisperDecoder | SA8775P ADP | SA8775P | QNN | 5.638 ms | 18 - 28 MB | FP16 | NPU | Use Export Script |
62
+ | WhisperDecoder | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 42.473 ms | 3 - 75 MB | FP16 | NPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperDecoder.tflite) |
63
+ | WhisperDecoder | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 5.146 ms | 20 - 71 MB | FP16 | NPU | Use Export Script |
64
+ | WhisperDecoder | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 3.907 ms | 20 - 20 MB | FP16 | NPU | Use Export Script |
65
+ | WhisperDecoder | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 14.267 ms | 107 - 107 MB | FP16 | NPU | [Whisper-Base-En.onnx](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperDecoder.onnx) |
66
+ | WhisperEncoder | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 196.633 ms | 35 - 110 MB | FP16 | GPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperEncoder.tflite) |
67
+ | WhisperEncoder | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 266.434 ms | 0 - 77 MB | FP16 | NPU | [Whisper-Base-En.so](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperEncoder.so) |
68
+ | WhisperEncoder | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 300.379 ms | 91 - 94 MB | FP16 | NPU | [Whisper-Base-En.onnx](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperEncoder.onnx) |
69
+ | WhisperEncoder | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 157.913 ms | 37 - 77 MB | FP16 | GPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperEncoder.tflite) |
70
+ | WhisperEncoder | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 186.485 ms | 1 - 287 MB | FP16 | NPU | [Whisper-Base-En.so](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperEncoder.so) |
71
+ | WhisperEncoder | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 211.549 ms | 94 - 982 MB | FP16 | NPU | [Whisper-Base-En.onnx](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperEncoder.onnx) |
72
+ | WhisperEncoder | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 140.336 ms | 37 - 60 MB | FP16 | GPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperEncoder.tflite) |
73
+ | WhisperEncoder | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 152.984 ms | 0 - 304 MB | FP16 | NPU | Use Export Script |
74
+ | WhisperEncoder | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 183.176 ms | 96 - 640 MB | FP16 | NPU | [Whisper-Base-En.onnx](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperEncoder.onnx) |
75
+ | WhisperEncoder | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 196.378 ms | 34 - 110 MB | FP16 | GPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperEncoder.tflite) |
76
+ | WhisperEncoder | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 199.737 ms | 0 - 21 MB | FP16 | NPU | Use Export Script |
77
+ | WhisperEncoder | SA7255P ADP | SA7255P | TFLITE | 1160.066 ms | 32 - 56 MB | FP16 | GPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperEncoder.tflite) |
78
+ | WhisperEncoder | SA7255P ADP | SA7255P | QNN | 935.326 ms | 1 - 11 MB | FP16 | NPU | Use Export Script |
79
+ | WhisperEncoder | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 200.355 ms | 34 - 123 MB | FP16 | GPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperEncoder.tflite) |
80
+ | WhisperEncoder | SA8255 (Proxy) | SA8255P Proxy | QNN | 217.297 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
81
+ | WhisperEncoder | SA8295P ADP | SA8295P | TFLITE | 204.198 ms | 38 - 66 MB | FP16 | GPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperEncoder.tflite) |
82
+ | WhisperEncoder | SA8295P ADP | SA8295P | QNN | 219.469 ms | 1 - 7 MB | FP16 | NPU | Use Export Script |
83
+ | WhisperEncoder | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 200.209 ms | 0 - 78 MB | FP16 | GPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperEncoder.tflite) |
84
+ | WhisperEncoder | SA8650 (Proxy) | SA8650P Proxy | QNN | 213.794 ms | 0 - 11 MB | FP16 | NPU | Use Export Script |
85
+ | WhisperEncoder | SA8775P ADP | SA8775P | TFLITE | 367.334 ms | 37 - 64 MB | FP16 | GPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperEncoder.tflite) |
86
+ | WhisperEncoder | SA8775P ADP | SA8775P | QNN | 195.132 ms | 0 - 6 MB | FP16 | NPU | Use Export Script |
87
+ | WhisperEncoder | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 284.098 ms | 39 - 83 MB | FP16 | GPU | [Whisper-Base-En.tflite](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperEncoder.tflite) |
88
+ | WhisperEncoder | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 283.131 ms | 0 - 297 MB | FP16 | NPU | Use Export Script |
89
+ | WhisperEncoder | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 160.208 ms | 0 - 0 MB | FP16 | NPU | Use Export Script |
90
+ | WhisperEncoder | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 297.781 ms | 133 - 133 MB | FP16 | NPU | [Whisper-Base-En.onnx](https://huggingface.co/qualcomm/Whisper-Base-En/blob/main/WhisperEncoder.onnx) |
91
 
92
 
93
 
 
148
  ```
149
  ```
150
  Profiling Results
 
 
 
 
 
 
 
 
 
151
  ------------------------------------------------------------
152
  WhisperDecoder
153
  Device : Samsung Galaxy S23 (13)
154
  Runtime : TFLITE
155
+ Estimated inference time (ms) : 37.9
156
+ Estimated peak memory usage (MB): [5, 43]
157
  Total # Ops : 983
158
  Compute Unit(s) : NPU (983 ops)
159
+
160
+ ------------------------------------------------------------
161
+ WhisperEncoder
162
+ Device : Samsung Galaxy S23 (13)
163
+ Runtime : TFLITE
164
+ Estimated inference time (ms) : 196.6
165
+ Estimated peak memory usage (MB): [35, 110]
166
+ Total # Ops : 419
167
+ Compute Unit(s) : GPU (408 ops) CPU (11 ops)
168
  ```
169
 
170
 
 
187
 
188
  # Load the model
189
  model = Model.from_pretrained()
 
190
  decoder_model = model.decoder
191
+ encoder_model = model.encoder
192
 
193
  # Device
194
  device = hub.Device("Samsung Galaxy S23")
195
 
196
  # Trace model
197
+ decoder_input_shape = decoder_model.get_input_spec()
198
+ decoder_sample_inputs = decoder_model.sample_inputs()
199
 
200
+ traced_decoder_model = torch.jit.trace(decoder_model, [torch.tensor(data[0]) for _, data in decoder_sample_inputs.items()])
201
 
202
  # Compile model on a specific device
203
+ decoder_compile_job = hub.submit_compile_job(
204
+ model=traced_decoder_model ,
205
  device=device,
206
+ input_specs=decoder_model.get_input_spec(),
207
  )
208
 
209
  # Get target model to run on-device
210
+ decoder_target_model = decoder_compile_job.get_target_model()
211
  # Trace model
212
+ encoder_input_shape = encoder_model.get_input_spec()
213
+ encoder_sample_inputs = encoder_model.sample_inputs()
214
 
215
+ traced_encoder_model = torch.jit.trace(encoder_model, [torch.tensor(data[0]) for _, data in encoder_sample_inputs.items()])
216
 
217
  # Compile model on a specific device
218
+ encoder_compile_job = hub.submit_compile_job(
219
+ model=traced_encoder_model ,
220
  device=device,
221
+ input_specs=encoder_model.get_input_spec(),
222
  )
223
 
224
  # Get target model to run on-device
225
+ encoder_target_model = encoder_compile_job.get_target_model()
226
 
227
  ```
228
 
 
234
  provisioned in the cloud. Once the job is submitted, you can navigate to a
235
  provided job URL to view a variety of on-device performance metrics.
236
  ```python
 
 
 
 
237
  decoder_profile_job = hub.submit_profile_job(
238
  model=decoder_target_model,
239
  device=device,
240
  )
241
+ encoder_profile_job = hub.submit_profile_job(
242
+ model=encoder_target_model,
243
+ device=device,
244
+ )
245
 
246
  ```
247
 
 
250
  To verify the accuracy of the model on-device, you can run on-device inference
251
  on sample input data on the same cloud hosted device.
252
  ```python
 
 
 
 
 
 
 
253
  decoder_input_data = decoder_model.sample_inputs()
254
  decoder_inference_job = hub.submit_inference_job(
255
  model=decoder_target_model,
 
257
  inputs=decoder_input_data,
258
  )
259
  decoder_inference_job.download_output_data()
260
+ encoder_input_data = encoder_model.sample_inputs()
261
+ encoder_inference_job = hub.submit_inference_job(
262
+ model=encoder_target_model,
263
+ device=device,
264
+ inputs=encoder_input_data,
265
+ )
266
+ encoder_inference_job.download_output_data()
267
 
268
  ```
269
  With the output of the model, you can compute like PSNR, relative errors or