Skip to content
ModelListedExternal
Download

Granite Speech 4.1 2b Nar Portable

This repository contains a portable ONNX Runtime artifact derived from IBM's Granite Speech 4.1 2B NAR model for local transcription in Taurscribe.

KindOtherBase modelibm-granite/granite-speech-4.1-2b-narVersionRevision 77d19a8

Model source

Kind
Other
File size
32.7 KB–784 MB
Base model
ibm-granite/granite-speech-4.1-2b-nar
Version
vRevision 77d19a8
Updated
Sep 13, 2026
Downloads
0
Source
Hugging Face

Source description

Granite Speech 4.1 2B NAR Portable INT4 for Taurscribe

This repository contains a portable ONNX Runtime artifact derived from IBM's Granite Speech 4.1 2B NAR model for local transcription in Taurscribe.

It is designed for Windows systems without an NVIDIA CUDA GPU. It supports:

  • full GPU inference through ONNX Runtime DirectML on compatible AMD, Intel, and NVIDIA DirectX 12 GPUs;
  • multi-threaded ONNX Runtime CPU inference as a portable fallback.

This is not a newly trained or fine-tuned model. The learned Granite weights, tokenizer, vocabulary, and supported languages are inherited from IBM's base model. Taurscribe changed the ONNX representation and host runtime path.

This is a multi-graph Taurscribe runtime bundle, not a single-file Transformers replacement. Correct inference requires Taurscribe's feature extraction, CTC, projection, edit-slot, and tokenizer pipeline.

What Changed

The portable artifact builds on Taurscribe's INT4/token-ID Granite bundle:

  1. Selected large MatMul weights use INT4 weight-only quantization through ONNX MatMulNBits.
  2. editor.onnx performs ArgMax in the graph and returns token_ids instead of transferring the full sequence-by-vocabulary logits tensor to Rust.
  3. Thirty-two rank-5 windowed-attention MatMul operations in encoder.onnx are reshaped to equivalent rank-3 batched operations supported by DirectML.
  4. Runtime shape chains are evaluated for Taurscribe's fixed [1, 800, 160] encoder bucket, stored as constants, and approximately 950 dead shape nodes are removed.
  5. Sixteen two-output GLU Split operations are replaced with equivalent Slice pairs to avoid incorrect output inside DirectML fused partitions.

Only encoder.onnx receives the DirectML compatibility rewrites. The projector, token embedding graph, editor, tokenizer, and model weights are copied from the INT4/token-ID parent artifact.

Runtime Placement

Full DirectML:

encoder.onnx      -> DirectML
projector.onnx    -> DirectML
embed_tokens.onnx -> DirectML
editor.onnx       -> DirectML

CPU fallback:

encoder.onnx      -> CPU
projector.onnx    -> CPU
embed_tokens.onnx -> CPU
editor.onnx       -> CPU

The ONNX files do not select a GPU vendor. Taurscribe's Rust code asks ONNX Runtime to create DirectML or CPU sessions. See taurscribe_granite_nar_manifest.json for the graph contract.

Validation

The conversion script compares every rewritten encoder output against the source encoder on CPU and aborts if the worst relative difference exceeds 1e-3. The produced artifact measured a worst relative difference of about 4.4e-5. DirectML encoder BPE argmax agreement with CPU was 1.0000 on the validated input.

The following end-to-end Taurscribe results use the same 30 utterances from LibriSpeech test-clean (mean processed duration: 8.47 seconds):

RouteHardwareMean latencyMean RTFMean WER
CUDA reference artifactRTX 4070 Laptop0.250 s0.0404.31%
This artifact, full DirectMLRadeon 780M4.045 s0.6434.31%
This artifact, CPU (8 threads)Ryzen 7 8845HS8.823 s1.4154.31%
Historical hybrid baseline1-thread CPU encoder + DirectML13.135 s2.1944.31%

These are limited local validation results, not a replacement for the base model's full published evaluation. See BENCHMARKS.md for methodology and tail latency.

Hardware Compatibility

  • AMD Radeon 780M DirectML: validated end to end with CPU fallback disabled.
  • NVIDIA DirectML: graph-level compatibility validated; use the separate CUDA artifact for substantially better NVIDIA performance.
  • Intel DirectML: expected to work on DirectX 12 hardware but not yet validated with this exact artifact.
  • x86-64 CPU: supported through ONNX Runtime CPU; actual speed depends heavily on memory bandwidth and thread count.

DirectML requires Windows and a DirectX 12-compatible GPU. A GPU driver or execution-provider failure should be handled by the host application with CPU fallback. For production hardware certification, run the DirectML probe in a separate helper process so a native driver crash cannot terminate the app.

Taurscribe Selection

Taurscribe model ID:

granite-speech-4.1-2b-nar-portable

Development overrides:

$env:TAURSCRIBE_GRANITE_BACKEND = "directml"
$env:TAURSCRIBE_GRANITE_DML_DEVICE_ID = "0"
$env:TAURSCRIBE_GRANITE_BACKEND = "cpu"
$env:TAURSCRIBE_GRANITE_CPU_THREADS = "8"

The DirectML device ID follows DXGI adapter order and is machine-specific.

Files

encoder.onnx
encoder.onnx.data
projector.onnx
projector.onnx.data
embed_tokens.onnx
editor.onnx
editor.onnx.data
tokenizer.json
tokenizer_config.json
preprocessor_config.json
processor_config.json
generation_config.json
taurscribe_granite_nar_manifest.json
manifest.json
BENCHMARKS.md
NOTICE
LICENSE

manifest.json records artifact metadata, exact file sizes, and SHA-256 checksums for the runtime payload.

Source and Attribution

No additional training or fine-tuning was performed by Taurscribe.

Sources

1 source
Hugging FacePrimaryVersion 77d19a8a95fb3f647b01f2d923607f8e00e03128
huggingface.co/Abdullahu5mani/granite-speech-4.1-2b-nar-portable/tree/77d19a8a95fb3f647b01f2d923607f8e00e03128

Verified Sep 13

Model artifacts

4 artifacts

editor.onnx

onnx · 1.56 MB · SHA-256 40dc0e1eafa1…d792 · Hugging Face

Download

embed_tokens.onnx

onnx · 784 MB · SHA-256 10f33a9646ea…1ad3 · Hugging Face

Download

encoder.onnx

onnx · 294 KB · SHA-256 e4e34584c2de…859a · Hugging Face

Download

projector.onnx

onnx · 32.7 KB · SHA-256 0641d423a570…68b2 · Hugging Face

Download

Source excerpts

2 excerpts

--- license: apache-2.0 base_model: ibm-granite/granite-speech-4.1-2b-nar library_name: onnx pipeline_tag: automatic-speech-recognition language: - en - fr - de - es - pt tags: - automatic-speech-recognition - granite-speech - onnx - onnxruntime - directml - cpu - int4 - matmulnbits - taurscribe --- # Granite Speech 4.1 2B NAR Portable INT4 for Taurscribe This repository contains a portable ONNX Runtime artifact derived from IBM's [Granite Speech 4.1 2B NAR](https://huggingface.co/ibm-granite/granite-speech-4.1-2b-nar) model for local transcription in Taurscribe. It is designed for Windows systems without an NVIDIA CUDA GPU. It supports: - full GPU inference through ONNX Runtime DirectML on compatible AMD, Intel, and NVIDIA DirectX 12 GPUs; - multi-threaded ONNX Runtime CPU inference as a portable fallback. This is not a newly trained or fine-tuned model. The learned Granite weights, tokenizer, vocabulary, and supported languages are inherited from IBM's base model. Taurscribe changed the ONNX representation and host runtime path. > This is a multi-graph Taurscribe runtime bundle, not a single-file > Transformers replacement. Correct inference requires Taurscribe's feature > extraction, CTC, projection, edit-slot, and tokenizer pipeline. ## What Changed The portable artifact builds on Taurscribe's INT4/token-ID Granite bundle: 1. Selected large `MatMul` weights use INT4 weight-only quantization through ONNX `MatMulNBits`. 2. `editor.onnx` performs `ArgMax` in the graph and returns `token_ids` instead of transferring the full sequence-by-vocabulary logits tensor to Rust. 3. Thirty-two rank-5 windowed-attention `MatMul` operations in `encoder.onnx` are reshaped to equivalent rank-3 batched operations supported by DirectML. 4. Runtime shape chains are evaluated for Taurscribe's fixed `[1, 800, 160]` encoder bucket, stored as constants, and approximately 950 dead shape nodes are removed. 5. Sixteen two-output GLU `Split` operations are replaced with equivalent `Slice` pairs to avoid incorrect output inside DirectML fused partitions. Only `encoder.onnx` receives the DirectML compatibility rewrites. The projector, token embedding graph, editor, tokenizer, and model weights are copied from the INT4/token-ID parent artifact. ## Runtime Placement Full DirectML: ```text encoder.onnx -> DirectML projector.onnx -> DirectML embed_toke...

Source context: 0 downloads · 0 likes · Pipeline automatic-speech-recognition · Library onnx · Repo Abdullahu5mani/granite-speech-4.1-2b-nar-portable