πŸŽ™οΈ 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: x float32 (1, 3000, 80) fbank, zero-padded to 30 s, plus x_lens int32, the true frame count. Padding is masked exactly.
  • Encoder output: encoder_out (1, 748, 512), already projected for the joiner, plus encoder_out_lens.
  • Decoder: y int32 (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 .cpuAndGPU for 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

License

GPL-3.0, inherited from tinyasr.

Downloads last month
10
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for Reza2kn/Shenava-Rizeh-v1.6-CoreML-fp16

Quantized
(6)
this model