Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ C/C++ speech-to-text inference library. Runs diverse STT model families via [GGU
| Canary-Qwen 2.5B | `canary-qwen-2.5b` | - | [docs/models/canary-qwen-2.5b.md](docs/models/canary-qwen-2.5b.md) |
| Cohere Transcribe | `cohere-transcribe-03-2026`, `cohere-transcribe-arabic-07-2026` | - | [docs/models/cohere.md](docs/models/cohere.md) |
| Fun-ASR-Nano | `fun-asr-mlt-nano-2512`, `fun-asr-nano-2512` | - | [docs/models/fun-asr-nano.md](docs/models/fun-asr-nano.md) |
| GigaAM | `gigaam-v3-ctc`, `gigaam-v3-e2e-ctc`, `gigaam-v3-e2e-rnnt`, `gigaam-v3-rnnt`, `gigaam-v4-e2e-rnnt` | token timestamps | [docs/models/gigaam.md](docs/models/gigaam.md) |
| GigaAM | `gigaam-multilingual-v2-e2e-rnnt`, `gigaam-v3-ctc`, `gigaam-v3-e2e-ctc`, `gigaam-v3-e2e-rnnt`, `gigaam-v3-rnnt`, `gigaam-v4-e2e-rnnt` | token timestamps | [docs/models/gigaam.md](docs/models/gigaam.md) |
| Granite Speech 4 / 4.1 | `granite-4.0-1b-speech`, `granite-speech-4.1-2b`, `granite-speech-4.1-2b-nar`, `granite-speech-4.1-2b-plus` | diarize, translate, word timestamps | [docs/models/granite-speech.md](docs/models/granite-speech.md) |
| Granite Speech 5.0 TurboCTC | `granite-speech-5.0-470m-turboctc`, `granite-speech-5.0-470m-turboctc-nc` | - | [docs/models/granite-speech-5.0-turboctc.md](docs/models/granite-speech-5.0-turboctc.md) |
| MedASR | `medasr` | token timestamps | [docs/models/medasr.md](docs/models/medasr.md) |
Expand Down
102 changes: 102 additions & 0 deletions catalog/gigaam-multilingual-v2-e2e-rnnt.json

Large diffs are not rendered by default.

192 changes: 192 additions & 0 deletions docs/models/gigaam-multilingual-v2-e2e-rnnt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
# GigaAM Multilingual-v2 e2e-RNN-T

<!-- catalog:intro -->
Upstream: [`ai-sage/GigaAM-Multilingual-v2`](https://huggingface.co/ai-sage/GigaAM-Multilingual-v2) at [`c21483b`](https://huggingface.co/ai-sage/GigaAM-Multilingual-v2/commit/c21483b).

Offline multilingual speech-to-text covering 21 languages, with punctuation and capitalization: Russian, English, German, French, Spanish, Italian, Portuguese, Dutch, Polish, Romanian, Belarusian, Kazakh, Kyrgyz, Uzbek, Tajik, Turkmen, Azerbaijani, Georgian, Armenian, Bashkir and Tatar. A Zapformer encoder conditioned on a language embedding, with an RNN-T decoder. The source language is selected per call (--language kk, hy, ...) or left to the model (auto). Recordings of any length are encoded in overlapping 25 s windows. Not a streaming model and does not translate.
<!-- /catalog -->

## What it's for

Offline speech-to-text in 21 languages, with cased and punctuated output.
It is the most accurate GigaAM model on FLEURS Russian and English, and
covers far more languages than the others. It is about three times the
size of [`gigaam-v4-e2e-rnnt`](gigaam-v4-e2e-rnnt.md) and about three times
slower.

The encoder is GigaAM-v4's Zapformer, larger and conditioned on a language
embedding. The source language is selected per call (`--language kk`).
Without a hint, or with `--language auto`, the model uses its default
embedding, which is how ai-sage reports its own results. On FLEURS the two
are within 0.2 points of each other on every language, so the hint is
optional. The model does not report which language it heard.

The checkpoint's `raw` head (lowercase, no punctuation) and its streaming
modes are not part of this port. Other GigaAM models are on the
[GigaAM page](gigaam.md). See ai-sage's
[model card](https://huggingface.co/ai-sage/GigaAM-Multilingual-v2) for
training data and their own evaluation.

<!-- catalog:pin -->
Licensed MIT. Ported from upstream commit [`c21483b`](https://huggingface.co/ai-sage/GigaAM-Multilingual-v2/commit/c21483b), pinned 2026-11-27. Validated against the upstream `modeling_gigaam.py` reference at transcribe.cpp commit [`d704775e`](https://github.com/handy-computer/transcribe.cpp/tree/d704775e) on 2026-12-04.
<!-- /catalog -->

## Download

Q8_0 is the recommended download. Every quant is within 0.05 points of
F32 on LibriSpeech and on FLEURS Russian, English and Kazakh, so Q4_K_M is
a good choice when size matters. On CPU it runs a little slower than Q8_0.

<!-- catalog:downloads -->
| Quantization | Download | Size | WER (LibriSpeech test-clean) |
| --- | --- | ---: | ---: |
| F32 | [gigaam-multilingual-v2-e2e-rnnt-F32.gguf](https://huggingface.co/handy-computer/gigaam-multilingual-v2-e2e-rnnt-gguf/resolve/main/gigaam-multilingual-v2-e2e-rnnt-F32.gguf) | 3.10 GB | 1.95% |
| F16 | [gigaam-multilingual-v2-e2e-rnnt-F16.gguf](https://huggingface.co/handy-computer/gigaam-multilingual-v2-e2e-rnnt-gguf/resolve/main/gigaam-multilingual-v2-e2e-rnnt-F16.gguf) | 1.55 GB | 1.94% |
| Q8_0 | [gigaam-multilingual-v2-e2e-rnnt-Q8_0.gguf](https://huggingface.co/handy-computer/gigaam-multilingual-v2-e2e-rnnt-gguf/resolve/main/gigaam-multilingual-v2-e2e-rnnt-Q8_0.gguf) | 828 MB | 1.96% |
| Q6_K | [gigaam-multilingual-v2-e2e-rnnt-Q6_K.gguf](https://huggingface.co/handy-computer/gigaam-multilingual-v2-e2e-rnnt-gguf/resolve/main/gigaam-multilingual-v2-e2e-rnnt-Q6_K.gguf) | 642 MB | 1.99% |
| Q5_K_M | [gigaam-multilingual-v2-e2e-rnnt-Q5_K_M.gguf](https://huggingface.co/handy-computer/gigaam-multilingual-v2-e2e-rnnt-gguf/resolve/main/gigaam-multilingual-v2-e2e-rnnt-Q5_K_M.gguf) | 556 MB | 1.97% |
| Q4_K_M | [gigaam-multilingual-v2-e2e-rnnt-Q4_K_M.gguf](https://huggingface.co/handy-computer/gigaam-multilingual-v2-e2e-rnnt-gguf/resolve/main/gigaam-multilingual-v2-e2e-rnnt-Q4_K_M.gguf) | 465 MB | 1.97% |
<!-- /catalog -->

<!-- catalog:recipe -->
WER on the full LibriSpeech test-clean split (2,620 utterances), batch size 8, timestamps none, language hint `en`, decoded on cuda. Measured at transcribe.cpp `d704775e`.
<!-- /catalog -->

<!-- catalog:prose field=wer.notes -->
Greedy RNN-T decoding, no external LM. PyTorch reference baseline on the same
manifest: 1.94%. ai-sage does not publish a LibriSpeech or FLEURS number. FLEURS
Uzbek reads high because its references spell oʻ and gʻ with U+02BB, which the
normalizer keeps, while the model writes an apostrophe, which it drops. Counting
the two as equal, Uzbek Q8_0 is 6.5%.
<!-- /catalog -->

FLEURS test, language given:

<!-- catalog:accuracy -->
**FLEURS test**

| Language | Metric | Q8_0 |
| --- | --- | ---: |
| az | WER | 6.67% |
| be | WER | 4.43% |
| de | WER | 3.87% |
| en | WER | 4.52% |
| es | WER | 2.93% |
| fr | WER | 4.36% |
| hy | WER | 4.50% |
| it | WER | 2.04% |
| ka | WER | 6.51% |
| kk | WER | 4.79% |
| ky | WER | 5.90% |
| nl | WER | 4.58% |
| pl | WER | 4.64% |
| pt | WER | 4.44% |
| ro | WER | 4.22% |
| ru | WER | 4.03% |
| tg | WER | 8.00% |
| uz | WER | 28.90% |
<!-- /catalog -->

## Languages

`ru`, `en`, `de`, `fr`, `es`, `it`, `pt`, `nl`, `pl`, `ro`, `be`, `kk`,
`ky`, `uz`, `tg`, `tk`, `az`, `ka`, `hy`, `ba`, `tt`. FLEURS has no
Bashkir, Turkmen or Tatar test set, so those three are not in the table
above. Any other `--language` value fails with `run: unsupported language`.

## Quick start

```bash
cmake -B build
cmake --build build

build/bin/transcribe-cli \
-m models/gigaam-multilingual-v2-e2e-rnnt/gigaam-multilingual-v2-e2e-rnnt-Q8_0.gguf \
--language ru \
samples/ru.wav
```

Leave out `--language` to let the model choose.

## Speed

### Apple M4 Max

<!-- catalog:perf machine=m4-max -->
Compute latency (mel + encode + decode), speedup over realtime in parentheses; profile `asr-publication-v2`: mean over 3 iterations after 1 warmup.

| Backend | Sample | Q8_0 | Q4_K_M |
| ------- | ------------ | ---------------: | ---------------: |
| Metal | jfk (11.0s) | 64 ms (171.82×) | 65 ms (168.52×) |
| Metal | dots (35.3s) | 220 ms (160.52×) | 226 ms (156.55×) |
| CPU | jfk (11.0s) | 330 ms (33.31×) | 446 ms (24.64×) |
| CPU | dots (35.3s) | 1.26 s (27.93×) | 1.60 s (22.10×) |

Apple M4 Max: transcribe.cpp `d704775e` on 2026-12-04.
<!-- /catalog -->

### AMD Ryzen 7 PRO 4750U

<!-- catalog:perf machine=ryzen-4750u -->
Compute latency (mel + encode + decode), speedup over realtime in parentheses; profile `asr-publication-v2`: mean over 3 iterations after 1 warmup.

| Backend | Sample | Q8_0 | Q4_K_M |
| ------- | ------------ | --------------: | --------------: |
| Vulkan | jfk (11.0s) | 1.06 s (10.38×) | 1.09 s (10.09×) |
| Vulkan | dots (35.3s) | 3.93 s (9.00×) | 3.94 s (8.96×) |
| CPU | jfk (11.0s) | 1.23 s (8.95×) | 1.09 s (10.05×) |
| CPU | dots (35.3s) | 5.34 s (6.62×) | 4.45 s (7.94×) |

AMD Ryzen 7 PRO 4750U (Radeon RADV RENOIR): transcribe.cpp `d704775e` on 2026-12-04.
<!-- /catalog -->

### Apple M1

No base Apple M4 was available, so these Apple M1 numbers stand in for it.

<!-- catalog:perf machine=m1 -->
Compute latency (mel + encode + decode), speedup over realtime in parentheses; profile `asr-publication-v2`: mean over 3 iterations after 1 warmup.

| Backend | Sample | Q8_0 | Q4_K_M |
| ------- | ------------ | --------------: | --------------: |
| Metal | jfk (11.0s) | 287 ms (38.37×) | 312 ms (35.30×) |
| Metal | dots (35.3s) | 1.05 s (33.50×) | 1.12 s (31.49×) |
| CPU | jfk (11.0s) | 1.05 s (10.47×) | 1.21 s (9.09×) |
| CPU | dots (35.3s) | 3.59 s (9.84×) | 4.45 s (7.93×) |

Apple M1 (stand-in for the base Apple M4): transcribe.cpp `d704775e` on 2026-12-04.
<!-- /catalog -->

To run the benchmark yourself:

```bash
uv run scripts/bench/run.py --profile --models gigaam-multilingual-v2-e2e-rnnt
```

## For developers

This port is checked against ai-sage's PyTorch model, layer by layer, with
`scripts/validate.py`. The
[family doc](../porting/families/gigaam.md#multilingual-v2-e2e-rnn-t) has
the details.

| Field | Value |
| --- | --- |
| Reference | `modeling_gigaam.py` from `ai-sage/GigaAM-Multilingual-v2` @ `c21483b`, built in F32 on CPU by `scripts/lib/gigaam_v4_hf.py` |
| Dump script | `scripts/dump_reference_gigaam_v4_hf.py` |
| Manifest | `tests/golden/gigaam/gigaam-multilingual-v2-e2e-rnnt.manifest.json` |
| Tolerances | `tests/tolerances/gigaam-multilingual-v2.json` |

Convert the original model, quantize it, and validate:

```bash
uv run --project scripts/envs/gigaam-v4 \
scripts/convert-gigaam-v4.py ai-sage/GigaAM-Multilingual-v2

build/bin/transcribe-quantize \
models/gigaam-multilingual-v2-e2e-rnnt/gigaam-multilingual-v2-e2e-rnnt-F32.gguf \
models/gigaam-multilingual-v2-e2e-rnnt/gigaam-multilingual-v2-e2e-rnnt-Q8_0.gguf \
--quant Q8_0

uv run scripts/validate.py all --family gigaam --variant gigaam-multilingual-v2-e2e-rnnt
```
60 changes: 45 additions & 15 deletions docs/models/gigaam.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ A sixth, `gigaam-v4-e2e-rnnt`, comes from
English, cased and punctuated, with a new encoder (Zapformer). See
[GigaAM-v4 E2E RNN-T](#gigaam-v4-e2e-rnnt).

A seventh, `gigaam-multilingual-v2-e2e-rnnt`, comes from
[`ai-sage/GigaAM-Multilingual-v2`](https://huggingface.co/ai-sage/GigaAM-Multilingual-v2):
21 languages, cased and punctuated, on a larger Zapformer encoder with an
optional language hint. See
[GigaAM Multilingual-v2 E2E RNN-T](#gigaam-multilingual-v2-e2e-rnn-t).

For the architecture deep-dive, validation contract, and porting notes,
see the family doc at
[`docs/porting/families/gigaam.md`](../porting/families/gigaam.md).
Expand All @@ -40,6 +46,11 @@ see the family doc at
GigaAM-v4's Zapformer encoder with the v3 RNN-T head shape; lower WER on
FLEURS Russian than `gigaam-v3-e2e-rnnt` (see the
[model page](gigaam-v4-e2e-rnnt.md#download)).
- **Cased + punctuated text in 21 languages.**
`gigaam-multilingual-v2-e2e-rnnt` — the best GigaAM model on FLEURS
Russian and English, at about three times the size and compute of
`gigaam-v4-e2e-rnnt` (see the
[model page](gigaam-multilingual-v2-e2e-rnnt.md#download)).
- **Russian, English, Kazakh, Kyrgyz, or Uzbek.**
`gigaam-multilingual-large-ctc` — lowercase charwise output with no
punctuation. No pre-built GGUF; convert it yourself, see
Expand All @@ -51,23 +62,24 @@ see the family doc at
## All variants

WER is on FLEURS Russian (`fleurs-ru`) for the **Q8_0** preset,
measured by transcribe.cpp's WER pipeline. `gigaam-v4-e2e-rnnt` also
transcribes English, so its row is LibriSpeech test-clean, which is
measured at every quant; its FLEURS Russian and English WER is on its
page. See each per-variant doc for the full quant matrix.
measured by transcribe.cpp's WER pipeline. `gigaam-v4-e2e-rnnt` and
`gigaam-multilingual-v2-e2e-rnnt` also transcribe English, so their rows
are LibriSpeech test-clean, which is measured at every quant. Their FLEURS
WER is on their pages. See each per-variant doc for the full quant matrix.

<!-- catalog:family variants=gigaam-v3-e2e-rnnt,gigaam-v3-e2e-ctc,gigaam-v3-rnnt,gigaam-v3-ctc,gigaam-v4-e2e-rnnt -->
| Variant | Params | Languages | Q8_0 size | Benchmark | Q8_0 | Capabilities | Doc |
<!-- catalog:family variants=gigaam-v3-e2e-rnnt,gigaam-v3-e2e-ctc,gigaam-v3-rnnt,gigaam-v3-ctc,gigaam-v4-e2e-rnnt,gigaam-multilingual-v2-e2e-rnnt -->
| Variant | Params | Languages | Q8_0 size | Benchmark | Q8_0 | Capabilities | Doc |
| --- | ---: | --- | ---: | --- | ---: | --- | --- |
| `gigaam-v3-e2e-rnnt` | 223M | ru | 274 MB | FLEURS ru (WER) | 5.35% | token timestamps | [gigaam-v3-e2e-rnnt.md](gigaam-v3-e2e-rnnt.md) |
| `gigaam-v3-e2e-ctc` | 221M | ru | 272 MB | FLEURS ru (WER) | 5.53% | token timestamps | [gigaam-v3-e2e-ctc.md](gigaam-v3-e2e-ctc.md) |
| `gigaam-v3-rnnt` | 222M | ru | 273 MB | FLEURS ru (WER) | 8.07% | token timestamps | [gigaam-v3-rnnt.md](gigaam-v3-rnnt.md) |
| `gigaam-v3-ctc` | 221M | ru | 272 MB | FLEURS ru (WER) | 8.42% | token timestamps | [gigaam-v3-ctc.md](gigaam-v3-ctc.md) |
| `gigaam-v4-e2e-rnnt` | 239M | ru, en | 255 MB | LibriSpeech test-clean (WER) | 2.05% | token timestamps | [gigaam-v4-e2e-rnnt.md](gigaam-v4-e2e-rnnt.md) |
| `gigaam-v3-e2e-rnnt` | 223M | ru | 274 MB | FLEURS ru (WER) | 5.35% | token timestamps | [gigaam-v3-e2e-rnnt.md](gigaam-v3-e2e-rnnt.md) |
| `gigaam-v3-e2e-ctc` | 221M | ru | 272 MB | FLEURS ru (WER) | 5.53% | token timestamps | [gigaam-v3-e2e-ctc.md](gigaam-v3-e2e-ctc.md) |
| `gigaam-v3-rnnt` | 222M | ru | 273 MB | FLEURS ru (WER) | 8.07% | token timestamps | [gigaam-v3-rnnt.md](gigaam-v3-rnnt.md) |
| `gigaam-v3-ctc` | 221M | ru | 272 MB | FLEURS ru (WER) | 8.42% | token timestamps | [gigaam-v3-ctc.md](gigaam-v3-ctc.md) |
| `gigaam-v4-e2e-rnnt` | 239M | ru, en | 255 MB | LibriSpeech test-clean (WER) | 2.05% | token timestamps | [gigaam-v4-e2e-rnnt.md](gigaam-v4-e2e-rnnt.md) |
| `gigaam-multilingual-v2-e2e-rnnt` | 776M | 21 languages | 828 MB | LibriSpeech test-clean (WER) | 1.96% | token timestamps | [gigaam-multilingual-v2-e2e-rnnt.md](gigaam-multilingual-v2-e2e-rnnt.md) |
<!-- /catalog -->

Pre-built GGUFs for every v3 variant, `gigaam-v4-e2e-rnnt`, and every
quant are hosted under
Pre-built GGUFs for every v3 variant, `gigaam-v4-e2e-rnnt`,
`gigaam-multilingual-v2-e2e-rnnt`, and every quant are hosted under
[`handy-computer` on Hugging Face](https://huggingface.co/handy-computer);
each per-variant doc has direct download links.

Expand Down Expand Up @@ -128,6 +140,22 @@ Downloads, WER, speed and the reproduction commands are on the
[family doc](../porting/families/gigaam.md#gigaam-v4-e2e-rnnt) has the
validation results.

## GigaAM Multilingual-v2 E2E RNN-T

`gigaam-multilingual-v2-e2e-rnnt` is the `e2e` head of
[`ai-sage/GigaAM-Multilingual-v2`](https://huggingface.co/ai-sage/GigaAM-Multilingual-v2).
It transcribes 21 languages into cased, punctuated text, from Russian and
English to Kazakh, Georgian and Tatar. The encoder is a larger version of
v4's Zapformer, conditioned on a language embedding. Pass `--language kk`
to select a language, or leave it out to let the model choose. On FLEURS
both give the same accuracy. The checkpoint's `raw` head and streaming
modes are not converted.

Downloads, WER, speed and the reproduction commands are on the
[model page](gigaam-multilingual-v2-e2e-rnnt.md). The
[family doc](../porting/families/gigaam.md#multilingual-v2-e2e-rnn-t) has
the validation results.

## Input limits

GigaAM is trained for utterances up to about **25 seconds**. Longer audio is
Expand All @@ -136,8 +164,8 @@ stitched into one sequence for a single greedy decode. There is no practical
length limit, and the encoder workspace does not grow with input length. Audio
up to 25 s is encoded in one pass. See the [input-length contract](../input-limits.md).

`gigaam-v4-e2e-rnnt` uses the same windows, each starting on an even
encoder frame so its half-rate stage groups the same frame pairs as one
`gigaam-v4-e2e-rnnt` and `gigaam-multilingual-v2-e2e-rnnt` use the same
windows, each starting on an even encoder frame so its half-rate stage groups the same frame pairs as one
pass over the whole clip would.

The runtime applies the same 25 s window to `gigaam-multilingual-large-ctc`.
Expand Down Expand Up @@ -180,3 +208,5 @@ runtime contract.
that it transcribes the five languages listed in
[its section](#gigaam-multilingual-large-ctc). `gigaam-v4-e2e-rnnt` has
them too, and transcribes Russian and English.
`gigaam-multilingual-v2-e2e-rnnt` has them too, and transcribes the 21
languages listed in [its section](#gigaam-multilingual-v2-e2e-rnn-t).
Loading