Hadith retrieval with Voyage
Uses Voyage-4-large at 2,048 dimensions. The current index contains about 703,000 records, with category metadata that connects search results to the original Hadith records.
Our work includes trained translation and transliteration models, plus retrieval systems that use embeddings from existing providers. Each addresses a different part of reading or searching a collection.
Hadith translation involves names, chains of narration, and terms that need consistent handling. We prepared parallel text and trained models on it. Translation output still needs review against the original passage.
Five translation directions and a transliteration tool are described below. Our embedding-based projects retrieve source passages instead of translating them; their model providers and index dimensions are listed separately.
A training pair contains the same passage in a source language and a target language. The model learns from many such examples.
When we say about 18 lakh pairs, we mean nearly 18 lakh (1.8 million) of these matched Hadith lines. The model learns from that pile, the way a student learns by reading many examples.
The wording of names, chains, and specialist terms matters in this material. Preparing and checking the matched text is part of the training work.
Five ways to move Hadith text from one language to another, and one light tool for script and spelling help.
Takes Urdu Hadith and puts it into Hindi (Devanagari) so readers who use Hindi script can follow the meaning more easily.
QASRATurns Urdu Hadith into clear English for students, teachers and anyone who studies in English.
QASRATranslates Arabic Hadith text into Urdu for readers studying the source material.
QASRAGoes straight from Arabic to English, without needing Urdu in the middle. Useful for study and wider sharing.
QASRAProduces Arabic text from Urdu input for comparison and study.
QASRAConverts Urdu and Arabic input into Hindi or Roman output. The available bundles use ONNX Runtime for inference.
QASRAWe fine-tuned existing models, including NLLB and mT5 variants, on our prepared Hadith pairs. Loss measures prediction error under a particular training setup. It is useful for following a run, but it does not directly measure whether a translation is accurate.
The Arabic-to-Urdu run recorded a starting loss of 8.88 and a final evaluation loss of 1.188. Other runs used different models or data. Their figures should be read within each setup, rather than used as a ranking of language directions or providers.
| Model (example runs) | What we used | Start loss | Final eval loss | Steps / notes |
|---|---|---|---|---|
| Arabic to Urdu | NLLB-200 (600M), re-trained on Hadith | 8.88 | 1.188 | About 14,589 steps. Loss fell step by step (1.45 → 1.34 → 1.28 → 1.24 → 1.21 → 1.19). No wild spikes. |
| Urdu to Hindi | mT5-Small (300M), re-trained | 17.45 | 0.236 | About 11,931 steps (1 epoch on that run). By step 2,000 already ~0.45; then settled near 0.24. |
| Urdu to Hinglish / Roman | mT5-Small (300M), re-trained | 19.03 | 0.381 | About 11,931 steps. Steady drop, then stable after ~10,000 steps. |
| Later NLLB Hadith runs | NLLB-200 distilled 600M on Hadith | ~1.27 (early train) | 0.15–0.18 | Urdu–Hindi eval ~0.15; Urdu–Hinglish eval ~0.18 after full epoch on GPU (A100 / A6000 class machines in our logs). |
An epoch is one pass over the training data. Evaluation checks during a run help track progress, but loss alone does not establish generalisation or publication quality. A comparison between models needs the same test material, evaluation method, and a review of actual output.
The transliterator converts script and phonetic forms. It is intended to keep names and complete word forms readable. The two available output bundles are Hindi (Devanagari) and Hinglish (Roman script).
Both bundles contain a Transformer encoder and a decoder exported to ONNX, along with tokenizers and inference scripts. They run with ONNX Runtime, SentencePiece, and NumPy; the inference scripts do not require a full training framework.
Each bundle has about 171 MB of external encoder and decoder weights, excluding the tokenizer and small graph files. This is the weight-file size, not a measurement of runtime memory or a comparison with another model.
A name or technical term needs a spelling that a reader can recognise and search for. For example, takhallus (تخلّص), a pen-name, is more useful in a catalogue than the shortened Roman form tkhls.
Words such as sheer and shair also need attention to context. The Urdu شیر can mean lion or milk; شاعر means poet. Check ambiguous words against the source, especially in passages prepared for publication.
Review names, specialist terms, missing words, and unintended changes of language. A readable conversion can still contain an error. Keep the original text available wherever the output will be used for research or teaching.
Contact support@qasra.org about model access or integration. Tell us which script you need, the type of text you are converting, and whether the model will run locally or in an application.
Training included data preparation, evaluation checkpoints, and changes to numerical precision where needed. For example, mT5 runs used bf16 after fp16 instability.
The translation runs used matched Hadith text prepared by QASRA.
Each model was re-trained, tested every few thousand steps, and saved when loss and output looked right to the team.
The transliterator has a bounded script-conversion task and can run from the supplied ONNX bundles.
An embedding represents text as a numerical vector. A search system compares a question’s vector with the vectors of stored passages to find related material. QASRA builds the collection, index, and retrieval application around existing embedding models.
Uses Voyage-4-large at 2,048 dimensions. The current index contains about 703,000 records, with category metadata that connects search results to the original Hadith records.
Uses text-embedding-3-large at 3,072 dimensions. This is a separate index of about 703,000 records. The two indexes differ slightly in record count; they should be evaluated separately.
Separate retrieval projects use Voyage embeddings for selected Quran translations and Tafseer passages. Search results are read with their source text and references.
Finding a passage and writing an answer are separate operations. The Hadith systems can return source records, optionally rerank candidates, and use retrieved material to support an AI-generated answer.
These are QASRA retrieval systems using provider models, separate from our trained translation models and the public library MCP endpoint. Contact support@qasra.org about access or a suitable evaluation for your collection. More dimensions alone do not establish better search quality.
For model access, retrieval evaluation, or a software integration, email support@qasra.org. Include your languages, the type of data, and the application you are building.
+91 7737378656 · +91 9529175756
support@qasra.org
Describe your project, the material or software involved, and any deadline. For integrations, include your platform and expected usage.
You can also use the contact form on our home page.