Instructions to use zeromodels/granite-speech-5.0-470m-turboctc with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ZeroModels
How to use zeromodels/granite-speech-5.0-470m-turboctc with ZeroModels:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Keras
How to use zeromodels/granite-speech-5.0-470m-turboctc with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://zeromodels/granite-speech-5.0-470m-turboctc") - Notebooks
- Google Colab
- Kaggle
See our collection for all versions of Granite Speech.
Run Granite Speech 5.0 with Keras 3: JAX, PyTorch, or TensorFlow
zeromodels/granite-speech-5.0-470m-turboctc
Paper: Granite-speech: open-source speech-aware LLMs with strong English ASR capabilities (arXiv:2505.08699) · HF Papers
Granite Speech 5.0 turboctc is a fast, non-autoregressive CTC ASR model: a conformer encoder (block-wise self-attention with Shaw relative positions, two early time-subsampling blocks) with a self-conditioned CTC head. The whole utterance is transcribed in a single forward pass — no decoder loop — then greedy-CTC decoded. Output is lowercase subword text.
For more details on the model, please go to the upstream model card.
Pure-Keras 3 conversion of ibm-granite/granite-speech-5.0-470m-turboctc for zeromodels. One implementation runs unmodified on TensorFlow / Torch / JAX.
This is an ASR (CTC) checkpoint (GraniteSpeech5CTC, 470M).
✨ Quick start
import os
os.environ["KERAS_BACKEND"] = "torch" # or "jax" / "tensorflow"
import soundfile as sf
from zeromodels.models.granite_speech5 import (
GraniteSpeech5CTC,
GraniteSpeech5FeatureExtractor,
GraniteSpeech5Tokenizer,
)
model = GraniteSpeech5CTC.from_weights("zeromodels/granite-speech-5.0-470m-turboctc")
features = GraniteSpeech5FeatureExtractor()
tokenizer = GraniteSpeech5Tokenizer.from_weights("zeromodels/granite-speech-5.0-470m-turboctc")
audio, sr = sf.read("your_audio.wav", dtype="float32") # 16 kHz mono
inputs = features(audio, sampling_rate=sr)
predicted_ids = model.generate(inputs) # greedy CTC decoding
print(tokenizer.batch_decode(predicted_ids))
Load any Granite Speech 5.0 variant the same way with from_weights("zeromodels/<variant>"):
| Variant | Hub | Notes |
|---|---|---|
granite-speech-5.0-470m-turboctc |
zeromodels/granite-speech-5.0-470m-turboctc |
470M · CTC ASR |
Tips
- Set
KERAS_BACKENDbefore importing Keras / zeromodels. - 16 kHz mono audio; the feature extractor returns
input_features+attention_mask. - CTC decode collapses repeats and drops the blank token —
tokenizer.batch_decode(...)handles it. - See Granite Speech docs and Loading Weights.
- Community / upstream safetensors still work via the
hf:prefix, e.g.GraniteSpeech5CTC.from_weights("hf:ibm-granite/granite-speech-5.0-470m-turboctc").
Special Thanks
A huge thank you to the IBM Granite team for creating and releasing these models.
License: Apache 2.0.
- Downloads last month
- -
Model tree for zeromodels/granite-speech-5.0-470m-turboctc
Base model
ibm-granite/granite-speech-5.0-470m-turboctc