Repository navigation
Description
Proposing support for ai-sage/GigaAM-v4 (Zapformer encoder + RNN-T).
- Upstream model repo: https://huggingface.co/ai-sage/GigaAM-v4
- Proposed family key:
gigaam(reusing the existing family withstt.gigaam.encoder.type = "zapformer"— open to a separate family key if preferred) - Variants:
gigaam-v4-e2e-rnnt(cased/punctuated RU+EN, 1024 SentencePiece) andgigaam-v4-raw-rnnt(raw/unpunctuated head in the same checkpoint) - Architecture pattern:
encoder-transducer
Notes
GigaAM-v4 keeps the same 64-mel frontend and 1-layer LSTM + ReLU Joint RNN-T decoder as GigaAM-v3, but replaces the 16-layer Conformer with a 3-stage 4/11/4 Zapformer (768/1024/768 dims, 2x frame stacking/unstacking in stage 1, causal Conv2d + ConvNeXt frontend, interleaved RoPE base 10000, gated flash attention, depthwise conv + global mean branch + SiLU, final RmsNorm).
I already put together a local working prototype and F32 GGUF converter (based on 0.4.1 while testing with Hex; prototype code was built with AI assistance and checked locally):
- Reuses existing
transcribe-quantizepolicy with no changes (e2ehead: 912 MB F32 -> 243 MB Q8_0). - Matches PyTorch
GigaAMDualASRencoder output on odd-length audio (T_enc=113:max_abs = 0.00057, cosine1.000000) and matches transcripts character-for-character across 6 RU/EN clips (including a 33.8s windowed clip) on CPU and Metal (F32 and Q8_0). - Runs ~45x–132x realtime on Apple M4 Metal Q8_0.
If you'd like this upstream, I can rebase it onto main, follow the docs/porting/ checklist (intake, preflight A/B, golden manifest/tolerances, clang-format, smoke tests), and open a PR. Before starting, would you prefer keeping this under the gigaam family (stt.gigaam.encoder.type = "zapformer") or splitting it into a new family key?
Prototype & candidate GGUFs (review artifacts)
- Branch: https://github.com/70sh1/transcribe.cpp/tree/gigaam-v4 (commit
4d860cd81b0b4cf89973d14e6a42d8891ca47f81, based on 0.4.1 fork) - Candidate GGUFs: https://huggingface.co/70sh1/gigaam-v4-e2e-rnnt-gguf
- Source revision:
ai-sage/GigaAM-v4@180301a192bb45bc2b2ca122e0d4aab24ffe7a96 - Conversion / quantization:
scripts/convert-gigaam-v4.py <snapshot> gigaam-v4-e2e-rnnt-F32.gguf --head e2e, thentranscribe-quantize --quant Q8_0 - SHA256:
gigaam-v4-e2e-rnnt-Q8_0.gguf:debd6179b9948beba5c60c0944285e577f32610dd50dee1233884e4b46e3e29gigaam-v4-e2e-rnnt-F32.gguf:6cd32ae7ded4ec470075ac7acb79c248b64818f118c6913a96c4a81ae11cd745
Activity
kalpakprod commentedon Nov 28, 2026
Thanks for the Zapformer port. Your v4 GGUF runs unchanged in wavo, which I've added Zapformer to (wavo PR).
I extended
convert-gigaam-v4.pyfor GigaAM-Multilingual-v2: its Swish activations (written tostt.gigaam.encoder.activation, which stays absent for SiLU) and its language conditioning (stt.gigaam.language.codes,embedding_dimandfilm_layers, plus the tensorslang.embed,lang.film.Nandlang.fusion.*). The late-fusion weight is split into the frames part and the language part, so a runtime can fold the language into the bias. On v4 the extended converter writes your file byte for byte. Feel free to take any of it into the PR you offered to open.The diff against convert-gigaam-v4.py at 4d860cd
yura0148 commentedon Nov 28, 2026
Interested in GigaAM-v4 (e2e-rnnt) upstream for Russian/English dictation on Windows + CUDA (transcribe.cpp 0.5.x). Happy to test Windows/CUDA builds once a PR is opened.
gigaam: run Multilingual-v2 language-conditioned RNN-T
nikita-ashihmin commentedon Nov 29, 2026
@70sh1 thanks for the port. I needed v4 for Handy, so I ran your branch through the porting checklist on top of current
mainand opened a PR: #285. Your Zapformer commit is in it as is (cherry-picked, authorship kept). On top of it:modeling_gigaam.pyat 180301a1 in its own env (the pinnedgigaampackage has no Zapformer), golden manifest, tolerances,enc.stage.<s>.outdumps, smoke test, intake and porting log, reference WER runnervalidate.py allis green onru(oddT_enc) andfleurs-en, preflight B passes, and the converter output is byte-identical to your F32/Q8_0 GGUFs. FLEURS WER: PyTorch 4.34% ru / 4.92% en, C++ F32 4.35% / 4.92%.Since you offered to open the PR yourself, tell me how you'd prefer to go: keep #285 and review it, or take whatever is useful into your own branch and I'll close mine. The
gigaamvs separate family key question is still open for the maintainers; I keptgigaamas in your branch.@yura0148 a Windows/CUDA run of #285 would help, I only tested CPU and Metal.
70sh1 commentedon Nov 29, 2026
@nikita-ashihmin
Feel free to continue the necessary work within your own PR (#285), I won't take it over for now.
cjpais commentedon Dec 3, 2026
This is supported and merged now, It'll be in the next release