psiddh commited on
Commit
5b585eb
·
verified ·
1 Parent(s): 4bc8543

Add ExecuTorch WebGPU program for whisper-base

Browse files
Files changed (1) hide show
  1. README.md +52 -6
README.md CHANGED
@@ -5,6 +5,7 @@ base_model:
5
  base_model_relation: quantized
6
  library_name: executorch
7
  pipeline_tag: automatic-speech-recognition
 
8
  tags:
9
  - executorch
10
  - webgpu
@@ -15,8 +16,7 @@ tags:
15
 
16
  This repository contains an [ExecuTorch](https://github.com/pytorch/executorch) conversion of
17
  [openai/whisper-base](https://huggingface.co/openai/whisper-base) for the ExecuTorch **WebGPU** backend, so the model runs entirely in a web browser on
18
- the visitor's GPU. It powers the corresponding demo in the
19
- ExecuTorch WebGPU Playground (launching soon on [executorch.ai](https://executorch.ai)).
20
 
21
  - **Base model:** [openai/whisper-base](https://huggingface.co/openai/whisper-base)
22
  - **Format:** ExecuTorch `.pte` programs delegated to the WebGPU backend
@@ -25,6 +25,34 @@ ExecuTorch WebGPU Playground (launching soon on [executorch.ai](https://executor
25
 
26
  > **Note:** OpenAI released Whisper's code under MIT; the weights are distributed under Apache-2.0, as on the upstream Hugging Face model card.
27
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  ## Files
29
 
30
  | File | Size | SHA-256 |
@@ -44,16 +72,34 @@ Full checksums are in `manifest.json`. The playground verifies them after downlo
44
 
45
  ## Running it
46
 
47
- These programs need the ExecuTorch WebGPU runtime compiled to WebAssembly
48
- ([backends/webgpu](https://github.com/pytorch/executorch/tree/main/backends/webgpu)). The easiest way to
49
- try the model is the ExecuTorch WebGPU Playground (launching soon on [executorch.ai](https://executorch.ai)),
50
- which downloads these files once, caches them in the browser, and runs everything locally.
 
 
 
51
 
52
  ## Provenance
53
 
54
  - Converted from the upstream checkpoint by the ExecuTorch team with the WebGPU export path.
55
  - A reproducible export recipe will be published alongside the open-source ExecuTorch WebGPU runtime.
56
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  ## License
58
 
59
  This is a derivative of the upstream model and is distributed under the same terms
 
5
  base_model_relation: quantized
6
  library_name: executorch
7
  pipeline_tag: automatic-speech-recognition
8
+ inference: false
9
  tags:
10
  - executorch
11
  - webgpu
 
16
 
17
  This repository contains an [ExecuTorch](https://github.com/pytorch/executorch) conversion of
18
  [openai/whisper-base](https://huggingface.co/openai/whisper-base) for the ExecuTorch **WebGPU** backend, so the model runs entirely in a web browser on
19
+ the visitor's GPU. It powers the corresponding demo in the ExecuTorch WebGPU Playground (launching soon on [executorch.ai](https://executorch.ai)).
 
20
 
21
  - **Base model:** [openai/whisper-base](https://huggingface.co/openai/whisper-base)
22
  - **Format:** ExecuTorch `.pte` programs delegated to the WebGPU backend
 
25
 
26
  > **Note:** OpenAI released Whisper's code under MIT; the weights are distributed under Apache-2.0, as on the upstream Hugging Face model card.
27
 
28
+ ## About the original model
29
+
30
+ The multilingual base Whisper model for speech recognition and translation, trained on 680k hours of labelled speech.
31
+
32
+ - **Developed by:** OpenAI
33
+ - **Paper:** [Robust Speech Recognition via Large-Scale Weak Supervision](https://arxiv.org/abs/2212.04356)
34
+ - 74M parameters
35
+ - Multilingual
36
+
37
+ For training data, evaluation results and full details, see the original model card: [openai/whisper-base](https://huggingface.co/openai/whisper-base).
38
+
39
+ ## Intended use and limitations
40
+
41
+ Transcribing speech to text.
42
+
43
+ Accuracy varies by language, accent and recording conditions, and the model can hallucinate text that was not spoken, especially on silence or noise. Do not use it to transcribe people without their consent; see the upstream card's Performance and Limitations section.
44
+
45
+ ## What changed in this conversion
46
+
47
+ - Token embeddings quantized to int8
48
+ - Log-mel front end, encoder, cross-attention KV, decoder and LM head exported as separate programs for streaming decoding
49
+
50
+ ## Inputs and outputs
51
+
52
+ - 16 kHz mono audio in Whisper's 30-second windows
53
+ - `whisper_mel.pte`: audio to log-mel spectrogram; `whisper_encoder.pte`: spectrogram to audio features; `whisper_cross_kv.pte`: features to cross-attention keys and values
54
+ - `whisper_decode_stream.pte` / `whisper_decoder_split.pte` with `whisper_lmhead.pte`: token-by-token decoding; token text from `vocab.json`
55
+
56
  ## Files
57
 
58
  | File | Size | SHA-256 |
 
72
 
73
  ## Running it
74
 
75
+ These programs were exported with the ExecuTorch WebGPU backend
76
+ ([backends/webgpu](https://github.com/pytorch/executorch/tree/main/backends/webgpu)) and validated with the
77
+ WebAssembly runtime build used by the ExecuTorch WebGPU Playground (launching soon on [executorch.ai](https://executorch.ai)). That runtime build is not published yet; until it is,
78
+ the playground is the supported way to run them. It downloads these files once, caches them in the browser,
79
+ and runs everything locally.
80
+
81
+ Requirements: a browser with WebGPU enabled.
82
 
83
  ## Provenance
84
 
85
  - Converted from the upstream checkpoint by the ExecuTorch team with the WebGPU export path.
86
  - A reproducible export recipe will be published alongside the open-source ExecuTorch WebGPU runtime.
87
 
88
+ ## Citation
89
+
90
+ If you use this model, please cite the original work:
91
+
92
+ ```bibtex
93
+ @misc{radford2022whisper,
94
+ doi={10.48550/ARXIV.2212.04356},
95
+ url={https://arxiv.org/abs/2212.04356},
96
+ author={Radford, Alec and Kim, Jong Wook and Xu, Tao and Brockman, Greg and McLeavey, Christine and Sutskever, Ilya},
97
+ title={Robust Speech Recognition via Large-Scale Weak Supervision},
98
+ publisher={arXiv},
99
+ year={2022}
100
+ }
101
+ ```
102
+
103
  ## License
104
 
105
  This is a derivative of the upstream model and is distributed under the same terms