# Spec for the HF README of handy-computer/granite-speech-4.1-2b-nar-gguf.
# Consumed by scripts/hf_cards/generate.py.

hf_repo: ibm-granite/granite-speech-4.1-2b-nar
target_repo: handy-computer/granite-speech-4.1-2b-nar-gguf
transcribe_docs_url: https://github.com/handy-computer/transcribe.cpp/blob/main/docs/models/granite-speech-4.1-2b-nar.md

upstream_commit: 99a4df9
pin_date: 2026-05-24

validation:
  reference: Transformers
  commit: c53af2c
  date: 2026-05-24

license: apache-2.0
license_display: Apache-2.0
pipeline_tag: automatic-speech-recognition
languages:
  - en
  - fr
  - de
  - es
  - pt
tags:
  - gguf
  - transcribe.cpp
  - asr
  - speech-to-text
  - granite
  - granite-speech
  - nar
  - non-autoregressive
  - multilingual

summary: |
  Offline multilingual speech-to-text in a single non-autoregressive editor
  pass. IBM Granite Speech 4.1-2b NAR shares the Conformer audio encoder
  with the AR Granite-Speech family but pairs it with a custom MLP-with-
  attention projector and the Granite-4.0-1b LLM used as a bidirectional
  editor (causal mask disabled). One forward pass produces logits over the
  full transcript; CTC decode yields the final text. No token-by-token loop.
  Takes a 16 kHz mono WAV and produces a transcript. English plus French,
  German, Spanish, and Portuguese; ASR only (no translation, no
  timestamps).

default_quant_index: 2  # Q8_0

# Capability flags for the transcribe_cpp metadata block.
capabilities:
  streaming: false
  translate: false
  lang_detect: false
  timestamps: none  # none | segment | word | token

# Speedup-over-realtime (×RT) per rig/backend, from docs/models; published
# raw as rtf_<machine> in the metadata block.
perf:
  m4-max:
    metal: 56
    cpu: 5
  m4:
    metal: 18
    cpu: 4
  ryzen-4750u:
    vulkan: 3.65
    cpu: 1.5

wer:
  source: LibriSpeech test-clean
  notes: |
    WER measured on the full LibriSpeech test-clean split (2620 utterances).
    BF16 reference baseline (transformers `model.transcribe`, MPS, re-run
    locally): 1.28% — matches the upstream model card's 1.29% to within
    sampling noise. Text normalizer: Whisper `EnglishTextNormalizer`, the
    same normalizer Open ASR Leaderboard uses. Reference reproduction
    follows the model card path verbatim (`AutoProcessor` +
    `AutoModel.transcribe` + `processor.batch_decode`) at HF revision
    `99a4df9` (single-file `modeling_granite_speech_nar.py` snapshot, the
    README's canonical target); no mask patching is required because the
    NAR LM uses `create_bidirectional_mask()` natively. F16, Q8_0, and
    Q6_K all match BF16's 1.29%; Q5_K_M dips slightly to 1.25% (within
    overlapping CIs).

quants:
  - name: BF16
    filename: granite-speech-4.1-2b-nar-BF16.gguf
    size: 4.20 GB
    wer: 1.29%
  - name: F16
    filename: granite-speech-4.1-2b-nar-F16.gguf
    size: 4.21 GB
    wer: 1.29%
  - name: Q8_0
    filename: granite-speech-4.1-2b-nar-Q8_0.gguf
    size: 2.33 GB
    wer: 1.29%
  - name: Q6_K
    filename: granite-speech-4.1-2b-nar-Q6_K.gguf
    size: 1.84 GB
    wer: 1.29%
  - name: Q5_K_M
    filename: granite-speech-4.1-2b-nar-Q5_K_M.gguf
    size: 1.66 GB
    wer: 1.25%
  - name: Q4_K_M
    filename: granite-speech-4.1-2b-nar-Q4_K_M.gguf
    size: 1.45 GB
    wer: 1.35%
