Run this model with HF Jobs
Run zeromodels/whisper_medium on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/zeromodels/whisper_medium. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/zeromodels/whisper_medium on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use zeromodels/whisper_medium with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ZeroModels
How to use zeromodels/whisper_medium with ZeroModels:
# pip install -U zeromodels # ZeroModels is pure Keras 3, so pick a backend: "jax", "torch" or "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" from zeromodels import AutoZModel # AutoZModel reads the repo's model_type and loads the matching class. # For a task head use the matching loader, e.g. AutoZMImageClassify / AutoZMDetect / # AutoZMSemanticSegment / AutoZMTextGenerate (see zeromodels.auto). model = AutoZModel.from_weights("zeromodels/whisper_medium") - Keras
How to use zeromodels/whisper_medium with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://zeromodels/whisper_medium") - Notebooks
- Google Colab
- Kaggle
Migrate to zeromodels (rename kf_*.json -> zm_*.json, fix refs in config + README, ensure tag + badge)
Browse filesFiles changed (3)
- README.md+20-20
- kf_config.json → zm_config.jsonRenamed+275-275
- kf_preprocessor.json → zm_preprocessor.jsonRenamed+11-11
1 unmodified line2345678910114 unmodified lines161718192021222324252627281 unmodified line303132333435364 unmodified lines414243444546474849505152531 unmodified line555657585960616263646566676869707172737475767778791 unmodified linepipeline_tag: automatic-speech-recognitionlicense: apache-2.0base_model: openai/whisper-mediumlibrary_name: kerasformerstags:- keras- kerasformers- whisper- automatic-speech-recognition- audio4 unmodified lines- tf---## ***See [our collection](https://huggingface.co/collections/kerasformers/whisper-6a6ac856710a03d7d2e207b6) for all versions of Whisper.***# Run Whisper with Keras 3: JAX, PyTorch, or TensorFlow[](https://github.com/IMvision12/KerasFormers) [](https://imvision12.github.io/KerasFormers/whisper/) [](https://huggingface.co/collections/kerasformers/whisper-6a6ac856710a03d7d2e207b6)# kerasformers/whisper_mediumPaper: [Robust Speech Recognition via Large-Scale Weak Supervision (arXiv:2212.04356)](https://arxiv.org/abs/2212.04356) · [HF Papers](https://huggingface.co/papers/2212.04356)1 unmodified lineFor more details on the model, please go to the upstream [model card](https://huggingface.co/openai/whisper-medium).Pure-**Keras 3** conversion of [`openai/whisper-medium`](https://huggingface.co/openai/whisper-medium) for [kerasformers](https://github.com/IMvision12/KerasFormers). One implementation runs unmodified on **TensorFlow / Torch / JAX**.This is an **ASR** checkpoint (`WhisperConditionalGenerate`, 769M).4 unmodified linesos.environ["KERAS_BACKEND"] = "torch" # or "jax" / "tensorflow"import soundfile as sffrom kerasformers.models.whisper import (WhisperProcessor,WhisperConditionalGenerate,)model = WhisperConditionalGenerate.from_weights("kerasformers/whisper_medium")processor = WhisperProcessor.from_weights("kerasformers/whisper_medium")audio, sr = sf.read("your_audio.wav", dtype="float32") # 16 kHz mono# task="transcribe" keeps the source language; "translate" -> English.1 unmodified lineprint(repr(text[0]))```Load any Whisper variant the same way with `from_weights("kerasformers/<variant>")`:| Variant | Hub | Notes ||---|---|---|| `whisper_tiny` | [`kerasformers/whisper_tiny`](https://huggingface.co/kerasformers/whisper_tiny) | 39M || `whisper_base` | [`kerasformers/whisper_base`](https://huggingface.co/kerasformers/whisper_base) | 74M || `whisper_small` | [`kerasformers/whisper_small`](https://huggingface.co/kerasformers/whisper_small) | 244M || `whisper_medium` | [`kerasformers/whisper_medium`](https://huggingface.co/kerasformers/whisper_medium) | 769M || `whisper_large` | [`kerasformers/whisper_large`](https://huggingface.co/kerasformers/whisper_large) | 1.55B || `whisper_large_v2` | [`kerasformers/whisper_large_v2`](https://huggingface.co/kerasformers/whisper_large_v2) | 1.55B || `whisper_large_v3` | [`kerasformers/whisper_large_v3`](https://huggingface.co/kerasformers/whisper_large_v3) | 128 mel bins || `whisper_large_v3_turbo` | [`kerasformers/whisper_large_v3_turbo`](https://huggingface.co/kerasformers/whisper_large_v3_turbo) | 4 decoder layers |## Tips- Set `KERAS_BACKEND` **before** importing Keras / kerasformers.- Prefer `WhisperProcessor.from_weights(...)` so mel bins match the variant (v3 uses 128).- Clips are padded to a 30 s window; chunk longer audio yourself.- See [Whisper docs](https://imvision12.github.io/KerasFormers/whisper/) and [Loading Weights](https://imvision12.github.io/KerasFormers/loading_weights/).- Community / upstream safetensors still work via the `hf:` prefix, e.g. `WhisperConditionalGenerate.from_weights("hf:openai/whisper-medium")`.## Special Thanks1 unmodified line2345678910114 unmodified lines161718192021222324252627281 unmodified line303132333435364 unmodified lines414243444546474849505152531 unmodified line555657585960616263646566676869707172737475767778791 unmodified linepipeline_tag: automatic-speech-recognitionlicense: apache-2.0base_model: openai/whisper-mediumlibrary_name: zeromodelstags:- keras- zeromodels- whisper- automatic-speech-recognition- audio4 unmodified lines- tf---## ***See [our collection](https://huggingface.co/collections/zeromodels/whisper-6a6ac856710a03d7d2e207b6) for all versions of Whisper.***# Run Whisper with Keras 3: JAX, PyTorch, or TensorFlow[](https://github.com/IMvision12/ZeroModels) [](https://imvision12.github.io/ZeroModels/whisper/) [](https://huggingface.co/collections/zeromodels/whisper-6a6ac856710a03d7d2e207b6)# zeromodels/whisper_mediumPaper: [Robust Speech Recognition via Large-Scale Weak Supervision (arXiv:2212.04356)](https://arxiv.org/abs/2212.04356) · [HF Papers](https://huggingface.co/papers/2212.04356)1 unmodified lineFor more details on the model, please go to the upstream [model card](https://huggingface.co/openai/whisper-medium).Pure-**Keras 3** conversion of [`openai/whisper-medium`](https://huggingface.co/openai/whisper-medium) for [zeromodels](https://github.com/IMvision12/ZeroModels). One implementation runs unmodified on **TensorFlow / Torch / JAX**.This is an **ASR** checkpoint (`WhisperConditionalGenerate`, 769M).4 unmodified linesos.environ["KERAS_BACKEND"] = "torch" # or "jax" / "tensorflow"import soundfile as sffrom zeromodels.models.whisper import (WhisperProcessor,WhisperConditionalGenerate,)model = WhisperConditionalGenerate.from_weights("zeromodels/whisper_medium")processor = WhisperProcessor.from_weights("zeromodels/whisper_medium")audio, sr = sf.read("your_audio.wav", dtype="float32") # 16 kHz mono# task="transcribe" keeps the source language; "translate" -> English.1 unmodified lineprint(repr(text[0]))```Load any Whisper variant the same way with `from_weights("zeromodels/<variant>")`:| Variant | Hub | Notes ||---|---|---|| `whisper_tiny` | [`zeromodels/whisper_tiny`](https://huggingface.co/zeromodels/whisper_tiny) | 39M || `whisper_base` | [`zeromodels/whisper_base`](https://huggingface.co/zeromodels/whisper_base) | 74M || `whisper_small` | [`zeromodels/whisper_small`](https://huggingface.co/zeromodels/whisper_small) | 244M || `whisper_medium` | [`zeromodels/whisper_medium`](https://huggingface.co/zeromodels/whisper_medium) | 769M || `whisper_large` | [`zeromodels/whisper_large`](https://huggingface.co/zeromodels/whisper_large) | 1.55B || `whisper_large_v2` | [`zeromodels/whisper_large_v2`](https://huggingface.co/zeromodels/whisper_large_v2) | 1.55B || `whisper_large_v3` | [`zeromodels/whisper_large_v3`](https://huggingface.co/zeromodels/whisper_large_v3) | 128 mel bins || `whisper_large_v3_turbo` | [`zeromodels/whisper_large_v3_turbo`](https://huggingface.co/zeromodels/whisper_large_v3_turbo) | 4 decoder layers |## Tips- Set `KERAS_BACKEND` **before** importing Keras / zeromodels.- Prefer `WhisperProcessor.from_weights(...)` so mel bins match the variant (v3 uses 128).- Clips are padded to a 30 s window; chunk longer audio yourself.- See [Whisper docs](https://imvision12.github.io/ZeroModels/whisper/) and [Loading Weights](https://imvision12.github.io/ZeroModels/loading_weights/).- Community / upstream safetensors still work via the `hf:` prefix, e.g. `WhisperConditionalGenerate.from_weights("hf:openai/whisper-medium")`.## Special Thanks
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276{"library_name": "kerasformers","kerasformers_version": "1.2.1","model_module": "kerasformers.models.whisper","model_class": "WhisperModel","variant": "whisper_medium","weights": "model.weights.json","schema_version": 2,"weight_dtype": "float32","model_type": "whisper","audio_config": {"num_layers": 24,"attention_heads": 16,"ffn_dim": 4096,"num_mel_bins": 80,"max_source_positions": 1500},"text_config": {"num_layers": 24,"attention_heads": 16,"ffn_dim": 4096,"vocab_size": 51865,"max_target_positions": 448},"hidden_dim": 1024,"activation_function": "gelu","layer_norm_eps": 1e-05,"scale_embedding": false,"generate_args": {"alignment_heads": [[13,15],[15,4],[15,15],[16,1],[20,0],[23,4]],"begin_suppress_tokens": [220,50257],"bos_token_id": 50257,"decoder_start_token_id": 50258,"eos_token_id": 50257,"forced_decoder_ids": [[1,null],[2,50359]],"is_multilingual": true,"lang_to_id": {"<|af|>": 50327,"<|am|>": 50334,"<|ar|>": 50272,"<|as|>": 50350,"<|az|>": 50304,"<|ba|>": 50355,"<|be|>": 50330,"<|bg|>": 50292,"<|bn|>": 50302,"<|bo|>": 50347,"<|br|>": 50309,"<|bs|>": 50315,"<|ca|>": 50270,"<|cs|>": 50283,"<|cy|>": 50297,"<|da|>": 50285,"<|de|>": 50261,"<|el|>": 50281,"<|en|>": 50259,"<|es|>": 50262,"<|et|>": 50307,"<|eu|>": 50310,"<|fa|>": 50300,"<|fi|>": 50277,"<|fo|>": 50338,"<|fr|>": 50265,"<|gl|>": 50319,"<|gu|>": 50333,"<|haw|>": 50352,"<|ha|>": 50354,"<|he|>": 50279,"<|hi|>": 50276,"<|hr|>": 50291,"<|ht|>": 50339,"<|hu|>": 50286,"<|hy|>": 50312,"<|id|>": 50275,"<|is|>": 50311,"<|it|>": 50274,"<|ja|>": 50266,"<|jw|>": 50356,"<|ka|>": 50329,"<|kk|>": 50316,"<|km|>": 50323,"<|kn|>": 50306,"<|ko|>": 50264,"<|la|>": 50294,"<|lb|>": 50345,"<|ln|>": 50353,"<|lo|>": 50336,"<|lt|>": 50293,"<|lv|>": 50301,"<|mg|>": 50349,"<|mi|>": 50295,"<|mk|>": 50308,"<|ml|>": 50296,"<|mn|>": 50314,"<|mr|>": 50320,"<|ms|>": 50282,"<|mt|>": 50343,"<|my|>": 50346,"<|ne|>": 50313,"<|nl|>": 50271,"<|nn|>": 50342,"<|no|>": 50288,"<|oc|>": 50328,"<|pa|>": 50321,"<|pl|>": 50269,"<|ps|>": 50340,"<|pt|>": 50267,"<|ro|>": 50284,"<|ru|>": 50263,"<|sa|>": 50344,"<|sd|>": 50332,"<|si|>": 50322,"<|sk|>": 50298,"<|sl|>": 50305,"<|sn|>": 50324,"<|so|>": 50326,"<|sq|>": 50317,"<|sr|>": 50303,"<|su|>": 50357,"<|sv|>": 50273,"<|sw|>": 50318,"<|ta|>": 50287,"<|te|>": 50299,"<|tg|>": 50331,"<|th|>": 50289,"<|tk|>": 50341,"<|tl|>": 50348,"<|tr|>": 50268,"<|tt|>": 50351,"<|uk|>": 50280,"<|ur|>": 50290,"<|uz|>": 50337,"<|vi|>": 50278,"<|yi|>": 50335,"<|yo|>": 50325,"<|zh|>": 50260},"max_initial_timestamp_index": 50,"max_length": 448,"no_timestamps_token_id": 50363,"pad_token_id": 50257,"prev_sot_token_id": 50361,"return_timestamps": false,"suppress_tokens": [1,2,7,8,9,10,14,25,26,27,28,29,31,58,59,60,61,62,63,90,91,92,93,359,503,522,542,873,893,902,918,922,931,1350,1853,1982,2460,2627,3246,3253,3268,3536,3846,3961,4183,4667,6585,6647,7273,9061,9383,10428,10929,11938,12033,12331,12562,13793,14157,14635,15265,15618,16553,16604,18362,18956,20075,21675,22520,26130,26161,26435,28279,29464,31650,32302,32470,36865,42863,47425,49870,50254,50258,50358,50359,50360,50361,50362],"task_to_id": {"transcribe": 50359,"translate": 50358}}}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276{"library_name": "zeromodels","zeromodels_version": "1.2.1","model_module": "zeromodels.models.whisper","model_class": "WhisperModel","variant": "whisper_medium","weights": "model.weights.json","schema_version": 2,"weight_dtype": "float32","model_type": "whisper","audio_config": {"num_layers": 24,"attention_heads": 16,"ffn_dim": 4096,"num_mel_bins": 80,"max_source_positions": 1500},"text_config": {"num_layers": 24,"attention_heads": 16,"ffn_dim": 4096,"vocab_size": 51865,"max_target_positions": 448},"hidden_dim": 1024,"activation_function": "gelu","layer_norm_eps": 1e-05,"scale_embedding": false,"generate_args": {"alignment_heads": [[13,15],[15,4],[15,15],[16,1],[20,0],[23,4]],"begin_suppress_tokens": [220,50257],"bos_token_id": 50257,"decoder_start_token_id": 50258,"eos_token_id": 50257,"forced_decoder_ids": [[1,null],[2,50359]],"is_multilingual": true,"lang_to_id": {"<|af|>": 50327,"<|am|>": 50334,"<|ar|>": 50272,"<|as|>": 50350,"<|az|>": 50304,"<|ba|>": 50355,"<|be|>": 50330,"<|bg|>": 50292,"<|bn|>": 50302,"<|bo|>": 50347,"<|br|>": 50309,"<|bs|>": 50315,"<|ca|>": 50270,"<|cs|>": 50283,"<|cy|>": 50297,"<|da|>": 50285,"<|de|>": 50261,"<|el|>": 50281,"<|en|>": 50259,"<|es|>": 50262,"<|et|>": 50307,"<|eu|>": 50310,"<|fa|>": 50300,"<|fi|>": 50277,"<|fo|>": 50338,"<|fr|>": 50265,"<|gl|>": 50319,"<|gu|>": 50333,"<|haw|>": 50352,"<|ha|>": 50354,"<|he|>": 50279,"<|hi|>": 50276,"<|hr|>": 50291,"<|ht|>": 50339,"<|hu|>": 50286,"<|hy|>": 50312,"<|id|>": 50275,"<|is|>": 50311,"<|it|>": 50274,"<|ja|>": 50266,"<|jw|>": 50356,"<|ka|>": 50329,"<|kk|>": 50316,"<|km|>": 50323,"<|kn|>": 50306,"<|ko|>": 50264,"<|la|>": 50294,"<|lb|>": 50345,"<|ln|>": 50353,"<|lo|>": 50336,"<|lt|>": 50293,"<|lv|>": 50301,"<|mg|>": 50349,"<|mi|>": 50295,"<|mk|>": 50308,"<|ml|>": 50296,"<|mn|>": 50314,"<|mr|>": 50320,"<|ms|>": 50282,"<|mt|>": 50343,"<|my|>": 50346,"<|ne|>": 50313,"<|nl|>": 50271,"<|nn|>": 50342,"<|no|>": 50288,"<|oc|>": 50328,"<|pa|>": 50321,"<|pl|>": 50269,"<|ps|>": 50340,"<|pt|>": 50267,"<|ro|>": 50284,"<|ru|>": 50263,"<|sa|>": 50344,"<|sd|>": 50332,"<|si|>": 50322,"<|sk|>": 50298,"<|sl|>": 50305,"<|sn|>": 50324,"<|so|>": 50326,"<|sq|>": 50317,"<|sr|>": 50303,"<|su|>": 50357,"<|sv|>": 50273,"<|sw|>": 50318,"<|ta|>": 50287,"<|te|>": 50299,"<|tg|>": 50331,"<|th|>": 50289,"<|tk|>": 50341,"<|tl|>": 50348,"<|tr|>": 50268,"<|tt|>": 50351,"<|uk|>": 50280,"<|ur|>": 50290,"<|uz|>": 50337,"<|vi|>": 50278,"<|yi|>": 50335,"<|yo|>": 50325,"<|zh|>": 50260},"max_initial_timestamp_index": 50,"max_length": 448,"no_timestamps_token_id": 50363,"pad_token_id": 50257,"prev_sot_token_id": 50361,"return_timestamps": false,"suppress_tokens": [1,2,7,8,9,10,14,25,26,27,28,29,31,58,59,60,61,62,63,90,91,92,93,359,503,522,542,873,893,902,918,922,931,1350,1853,1982,2460,2627,3246,3253,3268,3536,3846,3961,4183,4667,6585,6647,7273,9061,9383,10428,10929,11938,12033,12331,12562,13793,14157,14635,15265,15618,16553,16604,18362,18956,20075,21675,22520,26130,26161,26435,28279,29464,31650,32302,32470,36865,42863,47425,49870,50254,50258,50358,50359,50360,50361,50362],"task_to_id": {"transcribe": 50359,"translate": 50358}}}
123456789101112{"library_name": "kerasformers","kerasformers_version": "1.1.3","preprocessor_module": "kerasformers.models.whisper","preprocessor_class": "WhisperFeatureExtractor","variant": "whisper_medium","sampling_rate": 16000,"n_fft": 400,"hop_length": 160,"n_mels": 80,"chunk_length": 30}123456789101112{"library_name": "zeromodels","zeromodels_version": "1.1.3","preprocessor_module": "zeromodels.models.whisper","preprocessor_class": "WhisperFeatureExtractor","variant": "whisper_medium","sampling_rate": 16000,"n_fft": 400,"hop_length": 160,"n_mels": 80,"chunk_length": 30}
README.md+20-20
kf_config.json → zm_config.jsonRenamed+275-275
kf_preprocessor.json → zm_preprocessor.jsonRenamed+11-11