Views
No views yet
MatMul weights are squashed to 4-bit (INT4), while the highly sensitive Convolution layers remain at 8-bit (INT8). This avoids the accuracy collapse typical of pure INT4 models..onnx file comes pre-injected with all required Sherpa-ONNX metadata (feature dims, subsampling factors, sample rates, etc.).tokens.txt is included in the repository for immediate CTC decoding.| Property | Value |
|---|---|
| Base Model | mohammed/fastconformer-quran-ar |
| Architecture | EncDecHybridRNNTCTCBPE (FastConformer-Large) |
| Parameters | 114.6M |
| FP32 Model Size | qurankarim-fastconformer.onnx (458 MB) |
| Mixed Model Size | qurankarim-fastconformer-mixed.onnx (87 MB) |
| Encoder Layers | 18 × FastConformer blocks |
| Tokenizer | SentencePiece BPE, 1024 tokens + 1 Blank |
| Sample Rate | 16 kHz, mono |
| Accuracy | 98.1% Sequence Accuracy (Verse Recognition) |
| Framework | Exported to ONNX (from NVIDIA NeMo) |
1import sherpa_onnx
2
3recognizer = sherpa_onnx.OfflineRecognizer.from_nemo_ctc(
4 model="qurankarim-fastconformer-mixed.onnx", # 87 MB Mixed Model
5 tokens="tokens.txt",
6 num_threads=2,
7)
8
9# Pass your 16kHz mono audio array
10stream = recognizer.create_stream()
11stream.accept_waveform(16000, audio_samples)
12recognizer.decode_stream(stream)
13
14print(stream.result.text)
15Training Background & Progressive UnfreezingThe base model was fine-tuned using a 3-phase progressive unfreezing strategy on a single NVIDIA RTX 4070 Ti (12 GB). This prevented catastrophic forgetting of the base model's Arabic speech representations while allowing it to adapt strictly to Quranic phonetics and Tajweed rules.PhaseLayers UnfrozenStepsLRVal WERPhase 1Top 3 encoder + decoder20005e-50.0038Phase 2Upper half (layers 9–17) + decoder30001e-40.0018Phase 3All layers25005e-50.0014Training Data: tarteel-ai/everyayah — a diverse multi-reciter dataset of complete Quranic recitations at multiple audio qualities, covering all 114 surahs across dozens of reciters.Qualitative ExamplesThe following are exact reference vs. predicted outputs from the validation set. The model transcribed these word-for-word correctly, including full diacritization (Tashkeel):ReferencePredictedوَهُوَ الَّذِي جَعَلَ لَكُمُ اللَّيْلَ لِبَاسًا وَالنَّوْمَ سُبَاتًا وَجَعَلَ النَّهَارَ نُشُورًا✅ Perfectالزَّانِي لَا يَنْكِحُ إِلَّا زَانِيَةً أَوْ مُشْرِكَةً وَالزَّانِيَةُ لَا يَنْكِحُهَا إِلَّا زَانٍ أَوْ مُشْرِكٌ وَحُرِّمَ ذَلِكَ عَلَى الْمُؤْمِنِينَ✅ Perfectإِلَّا مَنْ تَابَ وَآمَنَ وَعَمِلَ عَمَلًا صَالِحًا فَأُولَئِكَ يُبَدِّلُ اللَّهُ سَيِّئَاتِهِمْ حَسَنَاتٍ وَكَانَ اللَّهُ غَفُورًا رَحِيمًا✅ Perfectإِذْ قَالَ لِأَبِيهِ وَقَوْمِهِ مَا تَعْبُدُونَ✅ Perfectيَوْمَ لَا يَنْفَعُ مَالٌ وَلَا بَنُونَ✅ Perfectإِذْ قَالَ لَهُمْ أَخُوهُمْ هُودٌ أَلَا تَتَّقُونَ✅ Perfectأَتَبْنُونَ بِكُلِّ رِيعٍ آيَةً تَعْبَثُونَ✅ PerfectThese span multiple surahs and include some of the most phonetically demanding Ayahs in the Quran—featuring long compound sentences, rare vocabulary (نُشُورًا، سُبَاتًا), emphatic consonants, and precise Tashkeel on every word.Intended Use & LimitationsIntended Use:Offline, on-device mobile applications (Android/iOS/Flutter)Quranic recitation transcription and verse trackingTajweed learning and pronunciation verification appsAyah identification from audioLimitations:Not for real-time streaming: This ONNX export processes the entire audio chunk at once. It is not configured for frame-by-frame streaming.Optimised specifically for Quranic Arabic — performance on Modern Standard Arabic or dialectal Arabic will be significantly lower.Best results are achieved on clean, single-speaker recitation audio at 16kHz. Heavy background noise may induce character stuttering.CitationIf you use this model, please cite the base model and dataset:Code snippet@misc{fastconformer-quran-ar,
16 author = {Mohammed},
17 title = {FastConformer Quran Arabic ASR},
18 year = {2026},
19 publisher = {Hugging Face},
20 url = {[https://huggingface.co/mohammed/fastconformer-quran-ar](https://huggingface.co/mohammed/fastconformer-quran-ar)}
21}
22
23@misc{everyayah,
24 author = {Tarteel AI},
25 title = {EveryAyah: A Quranic Recitation Dataset},
26 publisher = {Hugging Face},
27 url = {[https://huggingface.co/datasets/tarteel-ai/everyayah](https://huggingface.co/datasets/tarteel-ai/everyayah)}
28}