Downloads · 30 days
21
2% of all-time downloads
zeromodels/granite_speech_3_3_2b
granite_speech_3_3_2b is a automatic speech recognition model from zeromodels. Use it when you need speech turned into text. It is set up for zeromodels. The card lists the license as apache-2.0.
[](https://github.com/IMvision12/ZeroModels) [](https://imvision12.github.io/ZeroModels/granitespeech/) [](https://huggingface.co/collections/zeromodels/granite-speech-6a8eaf2e42e4b726c9c08ba8)
Downloads · 30 days
21
2% of all-time downloads
All-time downloads
1.2K
Public
Repo size
6.1 GB
Likes
1
Public
Click a slice to open those files.
.h56.1 GB · 100%
From the Hugging Face model README
Paper: Granite-speech: open-source speech-aware LLMs with strong English ASR capabilities (arXiv:2505.08699) · HF Papers
Granite Speech is a speech-aware LLM, not ASR with an LM bolted on. A conformer CTC encoder and BLIP-2 style Q-Former turn mel features into audio embeddings that fill <|audio|> placeholders in a Granite decoder. You ask for a transcript, a summary, or an answer in ordinary English; text-only mode keeps the plain Granite decoder.
For more details on the model, please go to the upstream model card.
Pure-Keras 3 conversion of ibm-granite/granite-speech-3.3-2b for zeromodels. One implementation runs unmodified on TensorFlow / Torch / JAX.
This is a speech LLM checkpoint (GraniteSpeechConditionalGenerate, Granite 3.3 2B). Prefer load_dtype="bfloat16".
import os
os.environ["KERAS_BACKEND"] = "torch" # or "jax" / "tensorflow"
import keras
import numpy as np
import soundfile as sf
from zeromodels.models.granite_speech import (
GraniteSpeechConditionalGenerate,
GraniteSpeechProcessor,
)
model = GraniteSpeechConditionalGenerate.from_weights(
"zeromodels/granite_speech_3_3_2b", load_dtype="bfloat16"
)
processor = GraniteSpeechProcessor.from_weights("zeromodels/granite_speech_3_3_2b")
audio, sr = sf.read("your_audio.wav", dtype="float32") # 16 kHz mono
# Ask in words: same audio + different instruction => different answer.
conversation = [
{
"role": "user",
"content": [
{"type": "audio"},
{
"type": "text",
"text": "can you transcribe the speech into a written format?",
},
],
}
]
inputs = processor(conversation=conversation, audio=audio, sampling_rate=sr)
out = model.generate(**inputs, max_new_tokens=64)
ids = np.asarray(keras.ops.convert_to_numpy(out))[0].tolist()
print(repr(processor.tokenizer.decode(ids)))
Load any Granite Speech variant the same way with from_weights("zeromodels/<variant>"):
| Variant | Hub | Notes |
|---|---|---|
granite_speech_3_3_2b | zeromodels/granite_speech_3_3_2b | Granite 3.3 2B |
granite_speech_3_3_8b | zeromodels/granite_speech_3_3_8b | Granite 3.3 8B |
granite_speech_4_1_2b | zeromodels/granite_speech_4_1_2b | Granite 4.1 2B |
granite_4_0_1b_speech | zeromodels/granite_4_0_1b_speech | Granite 4.0 1B |
KERAS_BACKEND before importing Keras / zeromodels.audio= + sampling_rate=; put only an {"type": "audio"} marker in the conversation.hf: prefix, e.g. GraniteSpeechConditionalGenerate.from_weights("hf:ibm-granite/granite-speech-3.3-2b").A huge thank you to the IBM Granite authors for creating and releasing these models.
License: Apache 2.0.