Views
No views yet
Fine-tune Voxtral Mini 3B for Quran ASR & Verse Identification by Ahmed Haytham
Note: The model is still in early stages of training. Progress is currently limited due to insufficient GPU resources. Further training and improvements are planned once more compute becomes available.
Audio Input
↓
Voxtral ASR (LoRA fine-tuned)
↓
Arabic Transcription
↓
Fuzzy Matcher (diacritics-aware)
↓
Quran Database (6,236 verses)
↓
Rich Response (Surah, Ayah, Translation, Juz, Type)kaggle_notebook.py to Kaggle1# 1. Install
2pip install -r requirements.txt
3
4# 2. Download Quran metadata
5python fetch_quran_data.py
6
7# 3. Train ASR (Phase 1)
8python train_quran_asr.py --max_samples 5000
9
10# 4. Evaluate
11python inference.py --eval --model ./voxtral-quran-asr
12
13# 5. Launch demo
14python gradio_demo.py --model ./voxtral-quran-asrvox_quran/
├── train_quran_asr.py # Phase 1: LoRA ASR fine-tuning
├── train_quran_qa.py # Phase 2: Instruct-mode QA fine-tuning
├── build_qa_dataset.py # Build QA training data
├── inference.py # Inference pipeline + evaluation
├── quran_metadata.py # Quran database + fuzzy matching
├── fetch_quran_data.py # Download Quran text/translations
├── gradio_demo.py # Interactive Gradio demo
├── kaggle_notebook.py # Self-contained Kaggle notebook
├── requirements.txt # Dependencies
├── data/
│ └── quran_data.json # Quran text + metadata (6,236 verses)
└── README.md| Parameter | Value |
|---|---|
| Base Model | Voxtral Mini 3B (mistralai/Voxtral-Mini-3B-2507) |
| Method | LoRA (r=16, α=32) |
| Dataset | EveryAyah (tarteel-ai/everyayah) |
| Samples | 5K (scale to 127K+) |
| GPU | T4 16GB (Kaggle free) |
| Epochs | 3 |
| Audio Encoder | Frozen |
| Target Modules | q_proj, k_proj, v_proj, o_proj |
apply_transcription_request(language="ar")apply_chat_template with conversation format| Field | Value |
|---|---|
| Surah | Al-Ikhlas — #112 |
| Ayah | 1 |
| English | "Say, He is Allah, One" |
| Juz | 30 |
| Type | Meccan |
| Confidence | 98% |
