Repository navigation
Conversation
vlsi
force-pushed
the
codex/gigaam-multilingual-convert
branch
from
November 7, 2026 10:00
13bb2c0 to
5700f12
Compare
Previously, the converter was loading GigaAM models via gigaam.load_model(), but the package gigaam was not able to load Multilingual. The new scripts/lib/gigaam_hf.py takes config.json and the weights from ai-sage/GigaAM-Multilingual (branch large_ctc, pinned commit) and builds the model from the same package. The config.json for Multilingual does not have mel parameters, so the converter takes them from the loaded model, and refuses a config value that disagrees with it. VARIANTS in scripts/lib/gigaam_hf.py is the one table of the repo and commit of every GigaAM variant; the converter, the reference dumper, and the WER runner read it, and a unit test compares it with the golden manifests. With $TRANSCRIBE_MODELS_DIR set, a revision that is a commit hash now downloads into $TRANSCRIBE_MODELS_DIR/<slug>@<commit>/ instead of <slug>/, for every converter that pins one: offline, huggingface_hub returns a non-empty <slug>/ without checking its commit. Part of handy-computer#87. Assisted-by: Claude Opus 5.5 Assisted-by: GPT 6.1 sol
vlsi
force-pushed
the
codex/gigaam-multilingual-convert
branch
from
November 7, 2026 10:01
13bb2c0 to
d803dc4
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Previously, the converter was loading GigaAM models via gigaam.load_model(), but the pinned version of gigaam package was not able to load Multilingual. The new scripts/lib/gigaam_hf.py takes config.json and the weights from ai-sage/GigaAM-Multilingual (branch large_ctc, pinned commit) and builds the model from the same package.
The config.json for Multilingual does not have mel_scale, mel_norm parameters, so the converter takes them from the loaded model.
The repo and commit of every GigaAM variant live in one table,
VARIANTSin scripts/lib/gigaam_hf.py, which the converter, the reference dumper, and the WER runner read; a unit test compares it with the golden manifests, and the dumper refuses a--revision(which validate.py now passes for gigaam) that differs from the pin.With
$TRANSCRIBE_MODELS_DIRset, a revision that is a commit hash, full or abbreviated, now downloads into$TRANSCRIBE_MODELS_DIR/<slug>@<commit>/instead of<slug>/. This applies to every converter and dumper that pins a commit throughlib.hf_source.download_snapshot(gigaam, ecapa_tdnn, any--revision <hash>): offline, huggingface_hub returns a non-empty<slug>/without checking its commit, so a pinned load could read another commit's files or files another tool saved there. An existing<slug>/copy is not reused for a pinned run; the first online run downloads the commit again, and an offline run without it fails with a LocalEntryNotFoundError that names the directory.Part of #87.
Scope
GigaChat3.1-Audio is not included in this PR (it could be added separately).
The WER runner (scripts/wer/run_reference_gigaam_author.py) accepts
multilingual_large_ctcand was run on one recording; a full WER run for Multilingual is not part of this PR.The gigaam package pin stays at 6e4b027c. Upstream 559d88d adds
multilingual_large_ctc, but loads it from the author CDN by MD5, and 8555893 and 559d88d change encoder.py, which would move the reference of the four v3 variants; whether to bump is a maintainer decision.AI Assistance
This was assisted by Opus 5.5 (implementation, review, fix), and Codec GPT 6.1 (review).
Validation
uv run scripts/validate.py all --family gigaam --variant gigaam-multilingual-large-ctc: 13 of 13 tensors are ok against tests/tolerances/gigaam-multilingual-large-ctc.json, which is now 1.5× the observed error (the recipe of the finalized gigaam.json). The transcript is ok.Preflight: Gate A without FAIL, the same profile as in gigaam-v3-ctc. Gate B: 5/5 PASS.
The Multilingual GGUF and all four GigaAM v3 GGUFs are byte-identical between the old and the new converters. The author CDN served an expired TLS certificate, so
gigaam.load_model("v3_*")could not download; the v3 comparison fed both converters the same model built from the pinned ai-sage/GigaAM-v3 Hugging Face branches.I compared C++ transcripts with PyTorch for 9 recordings: samples/ru.wav, samples/fleurs-ru.wav, samples/fleurs-en.wav, and two 6-12 sec samples from FLEURS validation for each of kk_kz, ky_kg, uz_uz. For F32, F16 and Q8_0 (CPU and Metal) and for Q6_K and Q5_K_M (Metal) C++ transcripts match PyTorch. For Q4_K_M one transcript kk differs with one letter.
I posted performance measurements here: anomalyco/hex#1448