qaihm-bot commited on
Commit
b96d419
·
verified ·
1 Parent(s): f78d9c2

Deprecation notice.

DEPLOYMENT_MODEL_LICENSE.pdf DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:4409f93b0e82531303b3e10f52f1fdfb56467a25f05b7441c6bbd8bb8a64b42c
3
- size 109629
 
 
 
 
LICENSE DELETED
@@ -1,2 +0,0 @@
1
- The license of the original trained model can be found at https://github.com/huggingface/transformers/blob/v4.42.3/LICENSE.
2
- The license for the deployable model files (.tflite, .onnx, .dlc, .bin, etc.) can be found in DEPLOYMENT_MODEL_LICENSE.pdf.
 
 
 
README.md CHANGED
@@ -1,275 +1,10 @@
 
1
  ---
2
  library_name: pytorch
3
  license: other
4
  tags:
5
- - foundation
6
- - android
7
- pipeline_tag: automatic-speech-recognition
8
 
9
  ---
10
-
11
- ![](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/whisper_tiny_en/web-assets/model_demo.png)
12
-
13
- # Whisper-Tiny-En: Optimized for Mobile Deployment
14
- ## Transformer-based automatic speech recognition (ASR) model for multilingual transcription and translation available on HuggingFace
15
-
16
-
17
- HuggingFace Whisper-Small ASR (Automatic Speech Recognition) model is a state-of-the-art system designed for transcribing spoken language into written text. This model is based on the transformer architecture and has been optimized for edge inference by replacing Multi-Head Attention (MHA) with Single-Head Attention (SHA) and linear layers with convolutional (conv) layers. It exhibits robust performance in realistic, noisy environments, making it highly reliable for real-world applications. Specifically, it excels in long-form transcription, capable of accurately transcribing audio clips up to 30 seconds long. Time to the first token is the encoder's latency, while time to each additional token is decoder's latency, where we assume a max decoded length specified below.
18
-
19
- This model is an implementation of Whisper-Tiny-En found [here](https://github.com/huggingface/transformers/tree/v4.42.3/src/transformers/models/whisper).
20
-
21
-
22
- This repository provides scripts to run Whisper-Tiny-En on Qualcomm® devices.
23
- More details on model performance across various devices, can be found
24
- [here](https://aihub.qualcomm.com/models/whisper_tiny_en).
25
-
26
-
27
-
28
- ### Model Details
29
-
30
- - **Model Type:** Model_use_case.speech_recognition
31
- - **Model Stats:**
32
- - Model checkpoint: openai/whisper-tiny
33
- - Input resolution: 80x3000 (30 seconds audio)
34
- - Max decoded sequence length: 200 tokens
35
- - Number of parameters (HfWhisperEncoder): 9.39M
36
- - Model size (HfWhisperEncoder) (float): 35.9 MB
37
- - Number of parameters (HfWhisperDecoder): 28.4M
38
- - Model size (HfWhisperDecoder) (float): 109 MB
39
-
40
- | Model | Precision | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit | Target Model
41
- |---|---|---|---|---|---|---|---|---|
42
- | HfWhisperEncoder | float | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | TFLITE | 405.15 ms | 19 - 43 MB | GPU | [Whisper-Tiny-En.tflite](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.tflite) |
43
- | HfWhisperEncoder | float | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | QNN_DLC | 61.635 ms | 1 - 61 MB | NPU | [Whisper-Tiny-En.dlc](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.dlc) |
44
- | HfWhisperEncoder | float | QCS8450 (Proxy) | Qualcomm® QCS8450 (Proxy) | TFLITE | 139.055 ms | 20 - 67 MB | GPU | [Whisper-Tiny-En.tflite](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.tflite) |
45
- | HfWhisperEncoder | float | QCS8450 (Proxy) | Qualcomm® QCS8450 (Proxy) | QNN_DLC | 54.112 ms | 1 - 68 MB | NPU | [Whisper-Tiny-En.dlc](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.dlc) |
46
- | HfWhisperEncoder | float | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | TFLITE | 108.657 ms | 9 - 63 MB | GPU | [Whisper-Tiny-En.tflite](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.tflite) |
47
- | HfWhisperEncoder | float | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | QNN_DLC | 20.259 ms | 0 - 18 MB | NPU | [Whisper-Tiny-En.dlc](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.dlc) |
48
- | HfWhisperEncoder | float | QCS9075 (Proxy) | Qualcomm® QCS9075 (Proxy) | TFLITE | 190.523 ms | 19 - 43 MB | GPU | [Whisper-Tiny-En.tflite](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.tflite) |
49
- | HfWhisperEncoder | float | QCS9075 (Proxy) | Qualcomm® QCS9075 (Proxy) | QNN_DLC | 23.489 ms | 0 - 61 MB | NPU | [Whisper-Tiny-En.dlc](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.dlc) |
50
- | HfWhisperEncoder | float | SA7255P ADP | Qualcomm® SA7255P | TFLITE | 405.15 ms | 19 - 43 MB | GPU | [Whisper-Tiny-En.tflite](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.tflite) |
51
- | HfWhisperEncoder | float | SA7255P ADP | Qualcomm® SA7255P | QNN_DLC | 61.635 ms | 1 - 61 MB | NPU | [Whisper-Tiny-En.dlc](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.dlc) |
52
- | HfWhisperEncoder | float | SA8255 (Proxy) | Qualcomm® SA8255P (Proxy) | TFLITE | 116.015 ms | 13 - 56 MB | GPU | [Whisper-Tiny-En.tflite](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.tflite) |
53
- | HfWhisperEncoder | float | SA8255 (Proxy) | Qualcomm® SA8255P (Proxy) | QNN_DLC | 20.124 ms | 0 - 20 MB | NPU | [Whisper-Tiny-En.dlc](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.dlc) |
54
- | HfWhisperEncoder | float | SA8295P ADP | Qualcomm® SA8295P | TFLITE | 116.144 ms | 19 - 51 MB | GPU | [Whisper-Tiny-En.tflite](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.tflite) |
55
- | HfWhisperEncoder | float | SA8295P ADP | Qualcomm® SA8295P | QNN_DLC | 50.493 ms | 0 - 64 MB | NPU | [Whisper-Tiny-En.dlc](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.dlc) |
56
- | HfWhisperEncoder | float | SA8650 (Proxy) | Qualcomm® SA8650P (Proxy) | TFLITE | 111.141 ms | 10 - 67 MB | GPU | [Whisper-Tiny-En.tflite](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.tflite) |
57
- | HfWhisperEncoder | float | SA8650 (Proxy) | Qualcomm® SA8650P (Proxy) | QNN_DLC | 20.279 ms | 0 - 14 MB | NPU | [Whisper-Tiny-En.dlc](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.dlc) |
58
- | HfWhisperEncoder | float | SA8775P ADP | Qualcomm® SA8775P | TFLITE | 190.523 ms | 19 - 43 MB | GPU | [Whisper-Tiny-En.tflite](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.tflite) |
59
- | HfWhisperEncoder | float | SA8775P ADP | Qualcomm® SA8775P | QNN_DLC | 23.489 ms | 0 - 61 MB | NPU | [Whisper-Tiny-En.dlc](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.dlc) |
60
- | HfWhisperEncoder | float | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 Mobile | TFLITE | 114.057 ms | 12 - 65 MB | GPU | [Whisper-Tiny-En.tflite](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.tflite) |
61
- | HfWhisperEncoder | float | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 Mobile | QNN_DLC | 20.071 ms | 0 - 15 MB | NPU | [Whisper-Tiny-En.dlc](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.dlc) |
62
- | HfWhisperEncoder | float | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 Mobile | ONNX | 56.155 ms | 11 - 107 MB | NPU | [Whisper-Tiny-En.onnx.zip](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.onnx.zip) |
63
- | HfWhisperEncoder | float | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | TFLITE | 85.868 ms | 20 - 65 MB | GPU | [Whisper-Tiny-En.tflite](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.tflite) |
64
- | HfWhisperEncoder | float | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | QNN_DLC | 15.68 ms | 0 - 70 MB | NPU | [Whisper-Tiny-En.dlc](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.dlc) |
65
- | HfWhisperEncoder | float | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | ONNX | 42.132 ms | 38 - 659 MB | NPU | [Whisper-Tiny-En.onnx.zip](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.onnx.zip) |
66
- | HfWhisperEncoder | float | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite Mobile | TFLITE | 84.386 ms | 20 - 48 MB | GPU | [Whisper-Tiny-En.tflite](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.tflite) |
67
- | HfWhisperEncoder | float | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite Mobile | QNN_DLC | 12.541 ms | 0 - 68 MB | NPU | [Whisper-Tiny-En.dlc](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.dlc) |
68
- | HfWhisperEncoder | float | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite Mobile | ONNX | 35.963 ms | 7 - 415 MB | NPU | [Whisper-Tiny-En.onnx.zip](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.onnx.zip) |
69
- | HfWhisperEncoder | float | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN_DLC | 19.564 ms | 2 - 2 MB | NPU | [Whisper-Tiny-En.dlc](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.dlc) |
70
- | HfWhisperEncoder | float | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 59.836 ms | 66 - 66 MB | NPU | [Whisper-Tiny-En.onnx.zip](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.onnx.zip) |
71
- | HfWhisperDecoder | float | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | TFLITE | 5.211 ms | 3 - 97 MB | NPU | [Whisper-Tiny-En.tflite](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.tflite) |
72
- | HfWhisperDecoder | float | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | QNN_DLC | 3.626 ms | 0 - 46 MB | NPU | [Whisper-Tiny-En.dlc](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.dlc) |
73
- | HfWhisperDecoder | float | QCS8450 (Proxy) | Qualcomm® QCS8450 (Proxy) | TFLITE | 3.568 ms | 3 - 115 MB | NPU | [Whisper-Tiny-En.tflite](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.tflite) |
74
- | HfWhisperDecoder | float | QCS8450 (Proxy) | Qualcomm® QCS8450 (Proxy) | QNN_DLC | 2.837 ms | 10 - 44 MB | NPU | [Whisper-Tiny-En.dlc](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.dlc) |
75
- | HfWhisperDecoder | float | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | TFLITE | 3.169 ms | 1 - 307 MB | NPU | [Whisper-Tiny-En.tflite](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.tflite) |
76
- | HfWhisperDecoder | float | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | QNN_DLC | 2.155 ms | 0 - 29 MB | NPU | [Whisper-Tiny-En.dlc](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.dlc) |
77
- | HfWhisperDecoder | float | QCS9075 (Proxy) | Qualcomm® QCS9075 (Proxy) | TFLITE | 3.899 ms | 3 - 98 MB | NPU | [Whisper-Tiny-En.tflite](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.tflite) |
78
- | HfWhisperDecoder | float | QCS9075 (Proxy) | Qualcomm® QCS9075 (Proxy) | QNN_DLC | 2.719 ms | 6 - 42 MB | NPU | [Whisper-Tiny-En.dlc](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.dlc) |
79
- | HfWhisperDecoder | float | SA7255P ADP | Qualcomm® SA7255P | TFLITE | 5.211 ms | 3 - 97 MB | NPU | [Whisper-Tiny-En.tflite](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.tflite) |
80
- | HfWhisperDecoder | float | SA7255P ADP | Qualcomm® SA7255P | QNN_DLC | 3.626 ms | 0 - 46 MB | NPU | [Whisper-Tiny-En.dlc](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.dlc) |
81
- | HfWhisperDecoder | float | SA8255 (Proxy) | Qualcomm® SA8255P (Proxy) | TFLITE | 3.108 ms | 0 - 314 MB | NPU | [Whisper-Tiny-En.tflite](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.tflite) |
82
- | HfWhisperDecoder | float | SA8255 (Proxy) | Qualcomm® SA8255P (Proxy) | QNN_DLC | 2.174 ms | 0 - 54 MB | NPU | [Whisper-Tiny-En.dlc](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.dlc) |
83
- | HfWhisperDecoder | float | SA8295P ADP | Qualcomm® SA8295P | TFLITE | 4.158 ms | 3 - 101 MB | NPU | [Whisper-Tiny-En.tflite](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.tflite) |
84
- | HfWhisperDecoder | float | SA8295P ADP | Qualcomm® SA8295P | QNN_DLC | 2.967 ms | 0 - 45 MB | NPU | [Whisper-Tiny-En.dlc](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.dlc) |
85
- | HfWhisperDecoder | float | SA8650 (Proxy) | Qualcomm® SA8650P (Proxy) | TFLITE | 3.195 ms | 1 - 262 MB | NPU | [Whisper-Tiny-En.tflite](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.tflite) |
86
- | HfWhisperDecoder | float | SA8650 (Proxy) | Qualcomm® SA8650P (Proxy) | QNN_DLC | 2.146 ms | 0 - 31 MB | NPU | [Whisper-Tiny-En.dlc](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.dlc) |
87
- | HfWhisperDecoder | float | SA8775P ADP | Qualcomm® SA8775P | TFLITE | 3.899 ms | 3 - 98 MB | NPU | [Whisper-Tiny-En.tflite](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.tflite) |
88
- | HfWhisperDecoder | float | SA8775P ADP | Qualcomm® SA8775P | QNN_DLC | 2.719 ms | 6 - 42 MB | NPU | [Whisper-Tiny-En.dlc](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.dlc) |
89
- | HfWhisperDecoder | float | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 Mobile | TFLITE | 3.061 ms | 0 - 302 MB | NPU | [Whisper-Tiny-En.tflite](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.tflite) |
90
- | HfWhisperDecoder | float | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 Mobile | QNN_DLC | 2.152 ms | 3 - 30 MB | NPU | [Whisper-Tiny-En.dlc](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.dlc) |
91
- | HfWhisperDecoder | float | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 Mobile | ONNX | 5.004 ms | 19 - 37 MB | NPU | [Whisper-Tiny-En.onnx.zip](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.onnx.zip) |
92
- | HfWhisperDecoder | float | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | TFLITE | 2.328 ms | 0 - 111 MB | NPU | [Whisper-Tiny-En.tflite](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.tflite) |
93
- | HfWhisperDecoder | float | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | QNN_DLC | 1.62 ms | 0 - 43 MB | NPU | [Whisper-Tiny-En.dlc](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.dlc) |
94
- | HfWhisperDecoder | float | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | ONNX | 4.514 ms | 23 - 417 MB | NPU | [Whisper-Tiny-En.onnx.zip](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.onnx.zip) |
95
- | HfWhisperDecoder | float | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite Mobile | TFLITE | 2.058 ms | 0 - 99 MB | NPU | [Whisper-Tiny-En.tflite](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.tflite) |
96
- | HfWhisperDecoder | float | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite Mobile | QNN_DLC | 1.35 ms | 1 - 32 MB | NPU | [Whisper-Tiny-En.dlc](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.dlc) |
97
- | HfWhisperDecoder | float | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite Mobile | ONNX | 3.411 ms | 24 - 176 MB | NPU | [Whisper-Tiny-En.onnx.zip](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.onnx.zip) |
98
- | HfWhisperDecoder | float | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN_DLC | 1.917 ms | 101 - 101 MB | NPU | [Whisper-Tiny-En.dlc](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.dlc) |
99
- | HfWhisperDecoder | float | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 4.214 ms | 75 - 75 MB | NPU | [Whisper-Tiny-En.onnx.zip](https://huggingface.co/qualcomm/Whisper-Tiny-En/blob/main/Whisper-Tiny-En.onnx.zip) |
100
-
101
-
102
-
103
-
104
- ## Installation
105
-
106
-
107
- Install the package via pip:
108
- ```bash
109
- pip install "qai-hub-models[whisper-tiny-en]"
110
- ```
111
-
112
-
113
- ## Configure Qualcomm® AI Hub to run this model on a cloud-hosted device
114
-
115
- Sign-in to [Qualcomm® AI Hub](https://app.aihub.qualcomm.com/) with your
116
- Qualcomm® ID. Once signed in navigate to `Account -> Settings -> API Token`.
117
-
118
- With this API token, you can configure your client to run models on the cloud
119
- hosted devices.
120
- ```bash
121
- qai-hub configure --api_token API_TOKEN
122
- ```
123
- Navigate to [docs](https://app.aihub.qualcomm.com/docs/) for more information.
124
-
125
-
126
-
127
- ## Demo off target
128
-
129
- The package contains a simple end-to-end demo that downloads pre-trained
130
- weights and runs this model on a sample input.
131
-
132
- ```bash
133
- python -m qai_hub_models.models.whisper_tiny_en.demo
134
- ```
135
-
136
- The above demo runs a reference implementation of pre-processing, model
137
- inference, and post processing.
138
-
139
- **NOTE**: If you want running in a Jupyter Notebook or Google Colab like
140
- environment, please add the following to your cell (instead of the above).
141
- ```
142
- %run -m qai_hub_models.models.whisper_tiny_en.demo
143
- ```
144
-
145
-
146
- ### Run model on a cloud-hosted device
147
-
148
- In addition to the demo, you can also run the model on a cloud-hosted Qualcomm®
149
- device. This script does the following:
150
- * Performance check on-device on a cloud-hosted device
151
- * Downloads compiled assets that can be deployed on-device for Android.
152
- * Accuracy check between PyTorch and on-device outputs.
153
-
154
- ```bash
155
- python -m qai_hub_models.models.whisper_tiny_en.export
156
- ```
157
-
158
-
159
-
160
- ## How does this work?
161
-
162
- This [export script](https://aihub.qualcomm.com/models/whisper_tiny_en/qai_hub_models/models/Whisper-Tiny-En/export.py)
163
- leverages [Qualcomm® AI Hub](https://aihub.qualcomm.com/) to optimize, validate, and deploy this model
164
- on-device. Lets go through each step below in detail:
165
-
166
- Step 1: **Compile model for on-device deployment**
167
-
168
- To compile a PyTorch model for on-device deployment, we first trace the model
169
- in memory using the `jit.trace` and then call the `submit_compile_job` API.
170
-
171
- ```python
172
- import torch
173
-
174
- import qai_hub as hub
175
- from qai_hub_models.models.whisper_tiny_en import Model
176
-
177
- # Load the model
178
- torch_model = Model.from_pretrained()
179
-
180
- # Device
181
- device = hub.Device("Samsung Galaxy S24")
182
-
183
- # Trace model
184
- input_shape = torch_model.get_input_spec()
185
- sample_inputs = torch_model.sample_inputs()
186
-
187
- pt_model = torch.jit.trace(torch_model, [torch.tensor(data[0]) for _, data in sample_inputs.items()])
188
-
189
- # Compile model on a specific device
190
- compile_job = hub.submit_compile_job(
191
- model=pt_model,
192
- device=device,
193
- input_specs=torch_model.get_input_spec(),
194
- )
195
-
196
- # Get target model to run on-device
197
- target_model = compile_job.get_target_model()
198
-
199
- ```
200
-
201
-
202
- Step 2: **Performance profiling on cloud-hosted device**
203
-
204
- After compiling models from step 1. Models can be profiled model on-device using the
205
- `target_model`. Note that this scripts runs the model on a device automatically
206
- provisioned in the cloud. Once the job is submitted, you can navigate to a
207
- provided job URL to view a variety of on-device performance metrics.
208
- ```python
209
- profile_job = hub.submit_profile_job(
210
- model=target_model,
211
- device=device,
212
- )
213
-
214
- ```
215
-
216
- Step 3: **Verify on-device accuracy**
217
-
218
- To verify the accuracy of the model on-device, you can run on-device inference
219
- on sample input data on the same cloud hosted device.
220
- ```python
221
- input_data = torch_model.sample_inputs()
222
- inference_job = hub.submit_inference_job(
223
- model=target_model,
224
- device=device,
225
- inputs=input_data,
226
- )
227
- on_device_output = inference_job.download_output_data()
228
-
229
- ```
230
- With the output of the model, you can compute like PSNR, relative errors or
231
- spot check the output with expected output.
232
-
233
- **Note**: This on-device profiling and inference requires access to Qualcomm®
234
- AI Hub. [Sign up for access](https://myaccount.qualcomm.com/signup).
235
-
236
-
237
-
238
-
239
- ## Deploying compiled model to Android
240
-
241
-
242
- The models can be deployed using multiple runtimes:
243
- - TensorFlow Lite (`.tflite` export): [This
244
- tutorial](https://www.tensorflow.org/lite/android/quickstart) provides a
245
- guide to deploy the .tflite model in an Android application.
246
-
247
-
248
- - QNN (`.so` export ): This [sample
249
- app](https://docs.qualcomm.com/bundle/publicresource/topics/80-63442-50/sample_app.html)
250
- provides instructions on how to use the `.so` shared library in an Android application.
251
-
252
-
253
- ## View on Qualcomm® AI Hub
254
- Get more details on Whisper-Tiny-En's performance across various devices [here](https://aihub.qualcomm.com/models/whisper_tiny_en).
255
- Explore all available models on [Qualcomm® AI Hub](https://aihub.qualcomm.com/)
256
-
257
-
258
- ## License
259
- * The license for the original implementation of Whisper-Tiny-En can be found
260
- [here](https://github.com/huggingface/transformers/blob/v4.42.3/LICENSE).
261
- * The license for the compiled assets for on-device deployment can be found [here](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/Qualcomm+AI+Hub+Proprietary+License.pdf)
262
-
263
-
264
-
265
- ## References
266
- * [Robust Speech Recognition via Large-Scale Weak Supervision](https://cdn.openai.com/papers/whisper.pdf)
267
- * [Source Model Implementation](https://github.com/huggingface/transformers/tree/v4.42.3/src/transformers/models/whisper)
268
-
269
-
270
-
271
- ## Community
272
- * Join [our AI Hub Slack community](https://aihub.qualcomm.com/community/slack) to collaborate, post questions and learn more about on-device AI.
273
- * For questions or feedback please [reach out to us](mailto:ai-hub-support@qti.qualcomm.com).
274
-
275
-
 
1
+
2
  ---
3
  library_name: pytorch
4
  license: other
5
  tags:
6
+ - deprecated
7
+ pipeline_tag: other
 
8
 
9
  ---
10
+ This model is deprecated. Please refer to https://aihub.qualcomm.com for the latest models and updates.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Whisper-Tiny-En_HfWhisperDecoder.dlc DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:3d38de3ecc8535d9e791a8e076a7bacf57b96c218c900cd401d7fe37b32cb86f
3
- size 97117892
 
 
 
 
Whisper-Tiny-En_HfWhisperDecoder.onnx.zip DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:612d6532fb6d5fd0efca659e44d93f2e9febb1c972de90c2d4adaea577fcf24c
3
- size 120336357
 
 
 
 
Whisper-Tiny-En_HfWhisperDecoder.tflite DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:8315aaddb046ceecb27b76f595bb8a63bd7a13fa30c8bf566e9c4d5a3df4c976
3
- size 113817292
 
 
 
 
Whisper-Tiny-En_HfWhisperEncoder.dlc DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:2f571e8f730a98bda9ddb6ceec23c606e2f922566410bbbb8dbaa10dcd899bfe
3
- size 19145812
 
 
 
 
Whisper-Tiny-En_HfWhisperEncoder.onnx.zip DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:0ddd344d424e5c76fba3931e9ea6b3fda86dfa263bd35f3da986599345ffb27b
3
- size 23537294
 
 
 
 
Whisper-Tiny-En_HfWhisperEncoder.tflite DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:882ef43964f7ea37f5d14da6e04c1e406ddaa5872ab216b90b6c6af399eeffe5
3
- size 37644668
 
 
 
 
precompiled/qualcomm-snapdragon-x-elite/Whisper-Tiny-En_HfWhisperDecoder.bin DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:feb5c7e6383d0ae11fbb594f06942aada96e1b1987981193209ec4946f9bc416
3
- size 97153024
 
 
 
 
precompiled/qualcomm-snapdragon-x-elite/Whisper-Tiny-En_HfWhisperDecoder.onnx.zip DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:b466dccaa1552c1d4e46b1f7c1a4f00720bc9d92a055cb0a12e798c447666dfe
3
- size 88673991
 
 
 
 
precompiled/qualcomm-snapdragon-x-elite/Whisper-Tiny-En_HfWhisperEncoder.bin DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:78687761a168dd50311f79621eedc78cc79dc89f34963d9768dc65b321a889d0
3
- size 29900800
 
 
 
 
precompiled/qualcomm-snapdragon-x-elite/Whisper-Tiny-En_HfWhisperEncoder.onnx.zip DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:ed77350cd8b947c8240049f18de9e34c3a1c9f142d8dd9e1eb683faff5b19407
3
- size 19175298
 
 
 
 
precompiled/qualcomm-snapdragon-x-elite/sdk_versions.yml DELETED
@@ -1,5 +0,0 @@
1
- sdk_versions:
2
- qnn_context_binary:
3
- qairt: 2.37.0.250724175447_124859
4
- precompiled_qnn_onnx:
5
- qairt: 2.33.2.250410134701_117956
 
 
 
 
 
 
sdk_versions.yml DELETED
@@ -1,8 +0,0 @@
1
- sdk_versions:
2
- tflite:
3
- tflite: 2.17.0
4
- qnn_dlc:
5
- qairt: 2.37.0.250724175447_124859
6
- onnx:
7
- qairt: 2.33.2.250410134701_117956
8
- onnx_runtime: 1.22.0