Nabra-82M INT4-QAT (ONNX)
INT4 quantization-aware-trained variant of Nabra-82M-v0.1-ONNX — part of the Nabra quantization family.
Family
| Repo | Precision | Size | Audio |
|---|---|---|---|
| Nabra-82M-v0.1-ONNX | FP32 | 325 MB | reference quality |
| nabra-82m-fp16-onnx | FP16 | 163 MB | perceptually identical to FP32 |
| nabra-82m-int8-onnx | INT8 | 83 MB | clean (ear-validated) |
| this repo | INT4-QAT | 57 MB | faint noise floor under speech |
Model
| File | nabra_int4qat.onnx — 56.9 MB |
| Quantization | QAT (6k steps, warm-started fake-quant with STE), per-channel learned scales (nibble-packed), bias compensation, INT8 front-end |
| Speed | RTF ≈ 0.66–0.68 @ 4 threads on Snapdragon 865/870 (real-time on mid-range phones) |
Audio samples
All samples are synthesized directly from the ONNX model in this repo (with a 2-point IIR notch at 4.8/9.6 kHz against iSTFT image tones — recommended in any player).
| Sentence | Sample |
|---|---|
| السَّلَامُ عَلَيْكُمْ وَرَحْمَةُ اللهِ وَبَرَكَاتُهُ | sala_int4qat.wav · FP32 reference |
| الْعِلْمُ نُورٌ وَالْجَهْلُ ظَلَامٌ | ilm_int4qat.wav · FP32 reference |
Quality
Ear-validated A/B vs FP32: nearly identical voice character. There is a faint broadband noise floor (~−37 dB relative, centered 500–2500 Hz) audible during speech on headphones in quiet conditions. This is the known limit of 4-bit weights for this architecture; extensive post-hoc optimization (AdaRound, GPTQ, grouped scales, hybrid precision splits, longer QAT runs at multiple learning rates) did not improve it and is documented in the base repo card.
For strictly clean audio, use nabra_int8.onnx at 83 MB.
Usage
Inputs (all shapes dynamic):
input_ids : int64 [1, T] phoneme ids, BOS/EOS wrapped (id 0)
ref_s : float32[1, 256] style vector from voices_af_msa.pt["af_msa"]
speed : float32[1] 1.0 = normal
-> audio : float32[T] 24 kHz mono
Phonemes come from espeak-ng (ar voice, IPA output), mapped through the base repo's vocab.json. Sequence length capped at 510 tokens.
License
Apache-2.0, following the base model.