Model reference · open weights
granite-speech-5.0-ONNX is an open-weight audio or speech model from IBM.
For self-hosting, compare this build's requirements below with the GPU you plan to rent.
Summary of the ibm-granite/granite-speech-5.0-2b-ONNX model card, 2026-10-29
What it is
| Released by | IBM |
|---|---|
| Released | 2026-10-28 |
From the model card
ONNX weights of ibm-granite/granite-speech-5.0-2b for in-browser inference with Transformers.js on WebGPU. These are the weights used by the granite-speech-webgpu demo.
| file | precision | size |
|---|---|---|
onnx/audio_encoder_q4.onnx | 4-bit weights, fp32 activations | 658 MB |
onnx/embed_tokens_q4f16.onnx | 4-bit weights, fp16 | 119 MB |
onnx/decoder_model_merged_q4f16.onnx | 4-bit weights, fp16, KV cache | 948 MB |
Weights are 4-bit, block size 32, asymmetric (MatMulNBits / GatherBlockQuantized).
import { AutoProcessor, GraniteSpeechForConditionalGeneration } from '@huggingface/transformers';
const model_id = 'ibm-granite/granite-speech-5.0-2b-ONNX';
const processor = await AutoProcessor.from_pretrained(model_id);
const model = await GraniteSpeechForConditionalGeneration.from_pretrained(model_id, {
dtype: { audio_encoder: 'q4', embed_tokens: 'q4f16', decoder_model_merged: 'q4f16' },
device: 'webgpu',
});
const messages = [{ role: 'user', content: 'transcribe the speech with proper punctuation and capitalization.' }];
const text = processor.tokenizer.apply_chat_template(messages, { add_generation_prompt: true, tokenize: false });
const inputs = await processor(text, audio /* Float32Array, 16 kHz mono */);
const ids = await model.generate({ ...inputs, max_new_tokens: 256 });
const output = processor.batch_decode(ids.slice(null, [inputs.input_ids.dims.at(-1), null]), { skip_special_tokens: true });
Transformers.js 4.3 or newer is required for WebGPU in Safari 26.
See the base model card for the supported tasks, prompts and languages.
granite-speech-5.0-2b has the same architecture as granite-speech-4.1-2b, except that the language model's rotary position embeddings use YaRN scaling (factor 4, up to 16384 positions). These files reuse the graphs of onnx-community/granite-speech-4.1-2b-ONNX with every weight re-derived from the 5.0 checkpoint:
Checks:
transformers on the bundled multilingual_sample.wav and LibriSpeech clips.hf-internal-testing/librispeech_asr_dummy set on the onnxruntime CPU EP, vs 2.70% for the 4.1 ONNX files under the same pipeline.The decoder's logits are 1/8 of transformers' logits, the same as the 4.1 ONNX files; this does not change greedy decoding.
Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.