Views
No views yet
ibm-granite/granite-speech-4.1-2b-nar, extracted, LoRA-finetuned with a
BPE-256 CTC head, and merged into a standalone greedy-CTC recognizer.[!NOTE] Gravel is granite broken into smaller pieces. This model is the 440M encoder chipped out of IBM's 2B+ibm-granite/granite-speech-4.1-2b-narplus a small CTC head. It is not an IBM release, it is a derivative of the granite model.
granite_speech conformer encoder from ibm-granite/granite-speech-4.1-2b-nar
instantiated from transformers.models.granite_speech classes, weights extracted,
then LoRA-adapted (r=16 on attention + macaron-FFN linears) and merged.ibm-granite/granite-speech-4.1-2b-nar.1import torch, torchaudio
2from transformers import AutoModel
3
4model = AutoModel.from_pretrained("futo-org/gravel-ctc-440m", trust_remote_code=True).eval()
5
6wav, sr = torchaudio.load("speech.wav") # any mono/stereo file
7wav = torchaudio.functional.resample(wav.mean(0), sr, 16000)
8print(model.transcribe(wav)) # greedy CTC text1from transformers import pipeline
2asr = pipeline("automatic-speech-recognition", model="futo-org/gravel-ctc-440m",
3 trust_remote_code=True)
4print(asr("speech.wav")["text"])ibm-granite/granite-speech-4.1-2b-nar (Apache-2.0, IBM).