ποΈ Shenava-Rizeh-v1.6-CoreML-fp16
A Core ML export (ML Program, iOS 16 / macOS 13+) of Shenava Rizeh v1.6, a 60M Zipformer2 RNN-T for Persian. It has the same interface as the v1.5 CoreML repo, so v1.6 is a drop-in upgrade: three models (encoder, decoder, joiner) plus a small RNN-T loop.
| Uniform Triple Threat, full benchmark (tinyasr + KenLM, beam 16) | 3.119 (v1.5: 3.201) |
| Poetry WER, held-out Ganjoor, no LM | 13.7% (v1.5: 18.8%) |
Files
Checked on an M2 Mac against the fp32 PyTorch model on a 30 s reference clip.
| File | Target | Size | Error vs fp32 | Tokens identical | M2 per 30 s (CPU / GPU / ALL) |
|---|---|---|---|---|---|
encoder.mlpackage (fp16, with reductions, softmax and norms in fp32) |
iOS 16 | 150 MB | 0.08% (GPU, ALL), 0.5% (CPU), 0.1% (ANE) | β on every compute unit | 238 / 64 / 144 ms |
encoder-int4.mlpackage (int4, blocks of 32) |
iOS 18 | 70 MB | 8.3% (this is the quantization itself) | β on every compute unit | 228 / 730 / 833 ms |
decoder.mlpackage, joiner.mlpackage |
iOS 16 |
- Encoder input:
xfloat32 (1, 3000, 80) fbank, zero-padded to 30 s, plusx_lensint32, the true frame count. Padding is masked exactly. - Encoder output:
encoder_out(1, 748, 512), already projected for the joiner, plusencoder_out_lens. - Decoder:
yint32 (1, 2), the last two tokens, starting at [0, 0] βdecoder_out(1, 512). - Joiner: returns
logit(1, 2080). Mask ids 32β1055 (the English block). Blank is 0, max 3 symbols per frame. - int4 on the Neural Engine: the ANE compiler rejects the int4 package, so Core ML falls back to CPU/GPU. Use fp16 with
.cpuAndGPUfor speed. Use int4 when app size matters more.
Features: kaldi fbank with samples in [-1, 1]: 25 ms / 10 ms, povey window, pre-emphasis 0.97, dither 0, 512-point FFT, 80 mel bins from 20β7600 Hz, log, snip_edges=false.
run_coreml.py and reference/ are the parity check. To rebuild: export_coreml.py (FQ=1 IOS18=1 gives the int4 base) plus cmq2.py.
Speaker diarization: encoder_spk.mlpackage in Shenava-Rizeh-v1.6-Diarization is this encoder with an extra speaker-feature output.
All formats
- Shenava-Rizeh-v1.6: int4
.tzffor the tinyasr engine (CPU/WASM), KenLM, engine patch, training code - Shenava-Rizeh-v1.6-sherpa-onnx: offline + streaming, fp32 / int8 / int4
- Shenava-Rizeh-v1.6-ONNX-fp16
- Shenava-Rizeh-v1.6-tract-streaming: pure Rust
- Shenava-Rizeh-v1.6-CoreML-fp16 and Shenava-Rizeh-v1.6-CoreML-iOS15-fp16 (streaming)
- Shenava-Rizeh-v1.6-Diarization: who spoke when, 3.5M parameters on top of this encoder
License
GPL-3.0, inherited from tinyasr.
- Downloads last month
- 10
Model tree for Reza2kn/Shenava-Rizeh-v1.6-CoreML-fp16
Base model
Reza2kn/Shenava-Rizeh-v1.6