Run this model with HF Jobs
Run zeromodels/whisper_base 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_base. 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_base 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_base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ZeroModels
How to use zeromodels/whisper_base 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_base") - Keras
How to use zeromodels/whisper_base 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_base") - Notebooks
- Google Colab
- Kaggle
fix readme.md
Browse files12345678910111213141516171819202122---pipeline_tag: automatic-speech-recognitionlicense: apache-2.0library_name: kerasformerstags:- keras- kerasformers- whisper- tf- jax- pytorch---# whisper_base (Keras 3)Pure-Keras 3 weights for [kerasformers](https://github.com/IMvision12/KerasFormers), mirrored from the GitHub release. License: `apache-2.0`.```pythonfrom kerasformers.models.whisper import WhisperSpeechToText, WhisperProcessormodel = WhisperSpeechToText.from_weights("whisper_base")processor = WhisperProcessor.from_weights("whisper_base")```1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283---pipeline_tag: automatic-speech-recognitionlicense: apache-2.0base_model: openai/whisper-baselibrary_name: kerasformerstags:- keras- kerasformers- whisper- automatic-speech-recognition- audio- multilingual- arxiv:2212.04356- pytorch- jax- 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_basePaper: [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)Whisper is a **multilingual** encoder-decoder ASR model trained on large-scale weak supervision. Use `task="transcribe"` to keep the source language or `task="translate"` to render English. Pass `language=None` to let the model detect the spoken language. Output is cased and punctuated.For more details on the model, please go to the upstream [model card](https://huggingface.co/openai/whisper-base).Pure-**Keras 3** conversion of [`openai/whisper-base`](https://huggingface.co/openai/whisper-base) for [kerasformers](https://github.com/IMvision12/KerasFormers). One implementation runs unmodified on **TensorFlow / Torch / JAX**.This is an **ASR** checkpoint (`WhisperSpeechToText`, 74M).## ✨ Quick start```pythonimport osos.environ["KERAS_BACKEND"] = "torch" # or "jax" / "tensorflow"import soundfile as sffrom kerasformers.models.whisper import (WhisperProcessor,WhisperSpeechToText,)model = WhisperSpeechToText.from_weights("kerasformers/whisper_base")processor = WhisperProcessor.from_weights("kerasformers/whisper_base")audio, sr = sf.read("your_audio.wav", dtype="float32") # 16 kHz mono# task="transcribe" keeps the source language; "translate" -> English.text = model.generate(audio, processor, language="en", task="transcribe")print(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. `WhisperSpeechToText.from_weights("hf:openai/whisper-base")`.## Special ThanksA huge thank you to the OpenAI Whisper authors for creating and releasing these models.License: Apache 2.0.
README.md+68-7