GigaAM v3 e2e RNN-T for Core ML, with a length mask
Core ML build of Sber's GigaAM v3 e2e_rnnt (Russian speech recognition with punctuation and capitalization), converted from ai-sage/GigaAM-v3 at commit 7655ad717f8122257385bb4b2f373db3697e8680 (MIT).
The encoder takes the real length of the audio and masks everything after it, so a phrase padded to the fixed 30 s window gives the same text as the unpadded audio. Encoders traced without that mask let attention and convolutions see the padding, which often drops the final period. The reference ConformerEncoder builds the attention mask only for batches larger than one, so passing a length alone is not enough; this export always builds it.
Files
| File | Role |
|---|---|
Encoder.mlmodelc |
Conformer encoder, fp16 weights and compute. Inputs audio_signal float32 [1, 64, 3000] (log-mel, padded with the log(1e-9) frames of zero audio) and length int32 [1] (real mel frames). Output encoded float16 [1, 768, 750]. |
Predictor.mlmodelc |
One LSTM step of the prediction network: x int32 [1, 1], hi/ci [1, 1, 320] to dec, ho, co. Copied unchanged from maxhlv/gigaam-v3-coreml at db44a79 (MIT). |
JointDecision.mlmodelc |
Joint network fused with argmax: enc [1, 768, 1], dec [1, 320, 1] to token_id. Copied unchanged from the same build. |
vocab.txt |
1024 SentencePiece pieces plus <blk> (1024). |
convert_gigaam_encoder.py |
The conversion and its check. |
Front end (must match): 16 kHz mono, n_fft 320, window 320, hop 160, 64 HTK mels, no normalization, center=False, then log(clamp(x, 1e-9, 1e9)). Encoder frames: two stride-2 convolutions, (n - 1) // 2 + 1 twice. Decode greedily, at most 10 symbols per frame, blank 1024.
Checks
On four synthetic fixtures (Russian short, Russian 8.6 s, Russian with English terms, English), greedy decoding of this encoder gives exactly the text of the fp32 PyTorch model on the unpadded audio on the GPU (CPU_AND_GPU) and the CPU. On the Neural Engine, fp16 arithmetic changed the end of the mixed phrase; on every unit, int8 weights did too, so the weights stay fp16.
Encoder latency for the 30 s window on an M5 Pro: 23 ms on the GPU, 81 ms on the Neural Engine, 137 ms on the CPU; load 1.5 s on the GPU against 11 s of Neural Engine specialization.
Environment: torch 2.7.1, coremltools 9.0, gigaam at 7447938d791c4f3e643386ee22c33777004293a5, target macOS 15.
Model tree for kuberstar-com/gigaam-v3-e2e-rnnt-coreml
Base model
ai-sage/GigaAM-v3