Whisper medium.en for mobile (ONNX)
An int8 ONNX copy of OpenAI's English-only Whisper medium model, for on-device speech recognition with ONNX Runtime. The Thì Thầm app uses it for English.
It is made from Xenova/whisper-medium.en at commit 4fbcf6e6deb6b1af698e6925bfe00730bd4be715.
The only change is that the attention maps are no longer graph outputs. ONNX Runtime keeps declared graph
outputs in memory, so Xenova's files need much more memory for each transcription than the model needs.
The weights, the nodes and the results are unchanged.
Peak memory
Net peak memory of one transcription (both sessions loaded, the encoder, then 20 decoder steps), with ONNX Runtime 1.31.1, 4 intra-op threads and graph optimization ENABLE_ALL, measured in fresh processes:
| Model | Xenova file | This copy |
|---|---|---|
| en medium | 5536 MB | 2249 MB |
Check against the original
On 2 FLEURS English clips, 30 greedy decoder steps from the prompt give identical tokens, and the encoder output is identical, for Xenova's file and for this copy.
Inputs and outputs
- Encoder
onnx/encoder_model_quantized.onnx: inputinput_features, float32 [1, 80, 3000] (log-mel of 30 s of audio); outputlast_hidden_state. - Decoder
onnx/decoder_model_merged_quantized.onnx: inputsinput_ids(int64),encoder_hidden_states,use_cache_branch(bool) andpast_key_values.*; outputslogitsandpresent.*. - Prompt:
[50257, 50362](<|startoftranscript|>,<|notimestamps|>). Stop at50256(<|endoftext|>).
Credits and license
- Whisper: OpenAI, openai/whisper-medium.en (Apache 2.0 on Hugging Face; the code and weights in openai/whisper are under the MIT License).
- ONNX export: Xenova, Xenova/whisper-medium.en, made for transformers.js.
- This copy: made with
make_mobile.py(included here for provenance; it runs fromtools/whisper_enof the app's repository). License: Apache 2.0, seeLICENSE, as the files it is made from. - Used by the Thì Thầm Android app for English speech recognition.
- Downloads last month
- 51
Model tree for pdnhan/whisper-medium.en-mobile
Base model
openai/whisper-medium.en