Models we built
and trained at QASRA

We trained our own tools so Hadith can be read more easily in Urdu, Hindi, English and Arabic. This page is simply a record of that work.

So more people can read the books they already trust

Many people want to read Hadith in their own language. General translators on the internet often twist religious wording or skip names and chains. So at QASRA we prepared Hadith text ourselves and trained models on that material.

These models were made and adjusted by our team. Right now this AI section mainly holds Models: five translation directions and one small transliterator. When we add more tools later, they will also be listed on this page.

~18 lakh Hadith pairs used in the real training (about 1.8 million matched lines)
6 models Five language directions plus one lightweight transliterator
Made here Prepared, trained and checked by QASRA for Hadith text, not for chatbots or ads

What is a “pair”?

One Hadith, written two ways

To teach a computer how to translate, you show it the same Hadith many times in two languages. Each matched set is called a pair.

First language Hadith text in Urdu or Arabic
Second language The same meaning in Hindi, English, and so on

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.

We used so many because Hadith language is careful. Names, chains and phrasing matter. More clean pairs give better, steadier results.

What we have trained so far

Five ways to move Hadith text from one language to another, and one light tool for script and spelling help.

01
Urdu to Hindi

Urdu to Hindi

Takes Urdu Hadith and puts it into Hindi (Devanagari) so readers who use Hindi script can follow the meaning more easily.

QASRA
02
Urdu to English

Urdu to English

Turns Urdu Hadith into clear English for students, teachers and anyone who studies in English.

QASRA
03
Arabic to Urdu

Arabic to Urdu

Brings Arabic source wording into Urdu. This is hard work, and it is one of the most useful pairs for local readers.

QASRA
04
Arabic to English

Arabic to English

Goes straight from Arabic to English, without needing Urdu in the middle. Useful for study and wider sharing.

QASRA
05
Urdu to Arabic

Urdu to Arabic

Works the other way: Urdu into Arabic. Helpful for comparison, teaching and when Arabic output is needed from Urdu notes.

QASRA
06
Light tool

Transliterator

A small, fast helper for script and phonetic forms (for example Romanised text). It sits beside the bigger translation models for daily use.

QASRA

We re-trained the models. Loss came down hard.

We did not leave a generic download as-is. We took open models (including NLLB-type bases), put them on our Hadith pairs, and ran full training again (re-train / fine-tune). Loss is a simple idea: lower means the model is making fewer mistakes on the test text.

A plain generic NLLB-style setup on this kind of work starts around loss 8 (our Arabic to Urdu run began near 8.88). After training on our data, the same line finished near 1.19. Urdu to Hindi and related runs finished even lower. That is the difference between “bare model” and “model that has actually seen Hadith pairs.”

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).

In short: generic NLLB sits high (around 8 on this task). Our re-trained models sit far lower. Epoch means one full pass over the training data. We also checked eval loss every few thousand steps so we could see the model was still learning, not just memorising noise.

Lightweight transliteration for Urdu, Hindi, Arabic and Roman forms

This is not a chatbot. It is a specialised conversion model: given text in one script or orthography, it maps spelling and pronunciation into the target form without rewriting the meaning. We built and re-trained it for classical and Hadith-style language, then compared it with large general models such as Gemma 4 and GPT-5.4 nano on the same kind of work.

01 Input

Source text

Urdu, Arabic, Hindi, or mixed religious lines from Hadith and related books.

02 Normalise

Clean form

Stabilize characters, spacing and script direction before conversion.

03 Convert

Transliterate

Map to the target script or Roman form with full words, not casual shortcuts.

04 Output

Stable line

Same meaning, correct spelling, no language mix, low memory cost.

Problem

Why general models struggle here

Gemma 4, GPT-5.4 nano and similar systems are trained to answer, invent and rephrase. When you ask only for transliteration, they often treat the line as free writing. They insert words that were never in the source. They switch language mid-sentence: Hindi or Hinglish appears inside Urdu, or odd English fragments appear inside Arabic. Spellings of names and literary terms are shortened or “modernised” until the original word is hard to recognise.

For Hadith and classical text that is unacceptable. A reader who sees a mangled pen-name or a wrong homophone loses trust. Batch conversion over thousands of lines multiplies every small error.

Approach

A model limited to conversion

The QASRA transliterator is deliberately narrow. It does not chat. It does not “improve” style. It does not invent explanations. Its job is orthographic and phonetic mapping: keep the meaning fixed, keep the form complete, stay inside the requested script.

Because the task is bounded, the model can be small. On our side it uses on the order of about two percent of the memory required by large general models for similar conversion work. That is a direct result of size and scope, not a slogan.

Hard cases

Full forms, not chat shortcuts

Casual Roman Urdu on messaging apps often compresses words: consonants only, missing vowels, arbitrary spelling. A serious transliterator must not copy that habit. Literary and religious terms should appear in their full, readable form so a student can look them up and a scholar can recognise them at once.

Example: the word takhallus (تخلّص), a pen-name in poetry and classical writing. A lazy converter may emit something like tkhls. That is fine for a private note. It is wrong for a library pipeline. Our model is trained to prefer the complete form takhallus, with vowels restored, so the word remains searchable and teachable.

The same rule applies to other classical terms, place names and isnad elements: expand to a stable full spelling rather than a phone-style abbreviation.

Case
Weak / casual output
Preferred QASRA-style output
Pen-name
تخلّص
tkhls
vowels dropped, hard to read
takhallus
full form, recognisable and searchable
Homophone
شیر / شاعر context
sheer / shair mixed blindly
wrong sense if context ignored
sheer or shair
chosen from surrounding meaning: lion / milk vs poet
Language mix
Urdu or Arabic line
Hindi / Hinglish words inserted
common in large chat models
stays in the target form
no mid-line script or language hop
Disambiguation

Sheer and shair are not the same word

Urdu and related languages are full of near-homophones that only context can separate. Sheer (شیر) may mean lion, or milk, depending on the sentence. Shair (شاعر / شعر related readings in Roman) points toward poet or poetry. A converter that only looks at loose sound will pick one spelling at random and damage the sense of the line.

Our transliterator is trained to use local context: nearby words, topic, and classical patterns typical of Hadith and literary prose. The goal is not clever guessing for chat. The goal is a stable Roman or cross-script form that a human reader would accept as the intended word.

The same idea extends to other confusable pairs in religious and literary text: names, titles, and technical terms that sound alike in speech but must not be collapsed in writing.

Comparison

Against Gemma 4 and GPT-5.4 nano on this task

On general chat benchmarks those large models are strong. On this narrow conversion task, in our use, they still show the failure modes above: hallucination of extra tokens, language mixing (Hindi or Hinglish inside Urdu or Arabic), unstable spelling of classical terms, and high memory use for a simple map from form A to form B.

The QASRA transliterator is weaker as a general assistant by design. It is stronger where we need it: full orthography (takhallus, not tkhls), context-aware choices (sheer vs shair), no casual script dumping, and roughly 2% of the memory footprint of those large models for the same class of conversion work on our side.

~2% Memory relative to large general models for similar conversion work
Full forms Prefers complete spellings such as takhallus over chat abbreviations
Context Separates confusable words (sheer / shair) using surrounding text
Conclusion

Task-bound choice, not overall ranking

We do not claim that a light transliterator replaces Gemma or GPT for every problem. We claim that for converting religious and Hadith-style text across scripts and Roman forms, a specialised model that we trained and checked is cleaner, more controllable, and far lighter to run. The correct comparison is not “which model is smarter overall,” but “which model writes takhallus correctly, picks sheer or shair from context, and refuses to paste Hindi into an Urdu line.” On that measure we keep the QASRA transliterator in production.

Made and checked by people at QASRA

We started from open models, re-trained them on our Hadith pairs, fixed crashes when precision went wrong (for example moving mT5 runs to bf16 when fp16 blew up), and kept the final weights we trusted.

Hadith data

We trained on Hadith pairs we prepared, not on random internet chat. That keeps the language nearer to the books.

Re-train, then check

Each model was re-trained, tested every few thousand steps, and saved when loss and output looked right to the team.

Light where it helps

The transliterator stays small on purpose: less memory, less mess, better control on script work than a huge general model.

Models first. We will add more later.

This page will grow with time. For now we are listing the models. When other tools are ready, they will appear here too.

Models (ready) Better search (later) Study helpers (later) Quality checks (later) More languages (later)

Questions about this work?

If you want to know more about these models or work with us, write to the academy.

Phone

+91 7737378656 · +91 9529175756

Email

support@qasra.org