Noor-Al-Ilm: Open-Source Islamic AI Fine-Tuned on Quran, Hadith & Classical Tafsir | OpenNoorIlm

بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيمِ

Noor-Al-Ilm — Open-Source Islamic AI
Fine-Tuned on Quran, Hadith & Classical Tafsir

نور العلم

Light of Knowledge  ·  By OpenNoorIlm  ·  Free & Open Source

🤗 HuggingFace 📦 Dataset ✅ MIT License 🧠 Qwen2.5-7B Base 🔧 LoRA Fine-Tuned 📖 GGUF + LoRA
Noor-Al-Ilm (نور العلم — Light of Knowledge) is a free, open-source Islamic AI assistant designed for the Muslim Ummah. It is fine-tuned on the most authentic classical Islamic sources — Sahih al-Bukhari, Sahih Muslim, Tafsir al-Jalalayn, Kanzul Iman, and 260+ verified fatawa — and can answer questions across Fiqh, Quran, Hadith, Islamic history, and general knowledge with proper source citations.

🌟 What Is Noor-Al-Ilm?

Noor-Al-Ilm is a large language model (LLM) fine-tuned specifically for Islamic knowledge. It is built on top of Qwen2.5-7B-Instruct — a powerful 7-billion-parameter base model from Alibaba Cloud — and fine-tuned by OpenNoorIlm using LoRA (Low-Rank Adaptation) via the Unsloth library on Google Colab.

The model features a unique IDRAG pipeline (Islamic Data RAG): before answering any question, it retrieves the most relevant Quranic ayahs, hadiths, and fatawa from a local FAISS vector index, then feeds that context to the model. This means answers are grounded in actual Islamic sources — not hallucinated.

Answers are returned in a structured format called LML (Light Markup Language) — a custom tagging system that produces rich, readable, citation-linked responses with ruling badges, four-madhab tabs, collapsible sections, and source chips.

🧠 Model Details

DetailValue
Model NameNoor-Al-Ilm (نور العلم)
Base ModelQwen/Qwen2.5-7B-Instruct
Fine-tuned byOpenNoorIlm
MethodLoRA via Unsloth (r=16, alpha=32)
Trainingv1 → v2 (3 epochs) → v3 (5 epochs, seq 2048)
Output FormatsGGUF (Ollama-ready) + LoRA adapters
LanguagesEnglish (primary) · Arabic terms · Urdu reference
Max Seq Length2048 tokens
LicenseMIT (open source)
HuggingFacehuggingface.co/OpenNoorIlm

📚 Training Datasets

Noor-Al-Ilm was trained on 7 carefully selected Islamic knowledge sources, all properly attributed. Classical texts (9th–15th century) are public domain. The full dataset is available at OpenNoorIlm on HuggingFace.

📖
Quran — Saheeh International (English)
Complete Quran with the Saheeh International English translation. ~6,236 ayahs across all 114 surahs.
Public Domain
📗
Kanzul Iman — Urdu Translation
Urdu Quran translation by Imam Ahmad Raza Khan Barelvi (d.1921 CE). ~6,236 ayahs.
Public Domain
📘
Tafsir al-Jalalayn (English)
Classical Quranic commentary by Imam al-Mahalli (d.1459) & Imam al-Suyuti (d.1505). ~6,200 ayah commentaries.
Public Domain
📜
Sahih al-Bukhari
The most authentic hadith collection compiled by Imam al-Bukhari (d.870 CE). 7,277 hadiths with English text and chapter headings.
Public Domain
📜
Sahih Muslim
The second most authentic hadith collection compiled by Imam Muslim (d.875 CE). 7,459 hadiths with full English translation.
Public Domain
⚖️
SeekersGuidance Fatawa
260+ verified fatawa from Sheikh Faraz Rabbani and scholars at seekersguidance.org, covering all four Sunni madhabs: Hanafi, Maliki, Shafi'i, Hanbali.
Attributed
🌱
OpenNoorIlm Seeds
Custom instruction-tuning QA pairs covering identity, fiqh rulings, Islamic history, coding, and Islamic ethics. Created by OpenNoorIlm.
MIT

🧩 Three-Brain Knowledge System

Noor-Al-Ilm intelligently selects one of three brain modes per answer, ensuring the right depth and citation style for each type of question:

🕌
Mufti Brain
Islamic fiqh, halal/haram rulings, worship, ethics — with all four madhab positions
📚
Scholar Brain
Islamic history, classical scholars, dynasties, books and intellectual tradition
🌐
Dunyawi Brain
Science, mathematics, coding (Python), and general worldly knowledge

🚀 How to Use Noor-Al-Ilm

Option 1 — Ollama (Easiest, No Coding Required)

If you have Ollama installed, run this in your terminal:

bash
ollama run OpenNoorIlm/Noor-ul-ilm-7B-Qwen

Option 2 — Python with Unsloth (Google Colab / GPU)

For developers who want to run the model in Python using the efficient Unsloth library:

python
# Install: pip install unsloth
from unsloth import FastLanguageModel
import torch

model, tokenizer = FastLanguageModel.from_pretrained(
    model_name     = "OpenNoorIlm/Noor-ul-ilm-7B-Qwen-15-3-2026",
    max_seq_length = 2048,
    load_in_4bit   = True,
)
FastLanguageModel.for_inference(model)

SYSTEM = """You are Noor-Al-Ilm, a deeply knowledgeable Islamic AI.
Answer every question with complete depth. English only.
Start with [HALAL]/[HARAM]/[FARD]/[ANS] then your answer."""

def ask(question):
    messages = [
        {"role": "system", "content": SYSTEM},
        {"role": "user",   "content": question},
    ]
    inputs = tokenizer.apply_chat_template(
        messages, tokenize=True,
        add_generation_prompt=True, return_tensors="pt"
    ).to("cuda")
    outputs = model.generate(
        input_ids=inputs, max_new_tokens=600,
        temperature=0.7, top_p=0.9,
        repetition_penalty=1.15, do_sample=True,
    )
    return tokenizer.decode(
        outputs[0][inputs.shape[1]:], skip_special_tokens=True
    )

print(ask("Is cryptocurrency trading halal?"))

🔖 LML — Light Markup Language

Noor-Al-Ilm writes its answers in LML (Light Markup Language) — a custom tagging format that makes answers structured, citation-linked, and easy to render into rich HTML. Here's a quick reference:

[HALAL] [HARAM] [FARD]
Ruling badges — coloured pills at start of answer
[ANS]...[/ANS]
Main answer section
[WHY]...[/WHY]
Evidence & reasoning (collapsible)
[MADHABS]...[/MADHABS]
Four-madhab tabbed view (Hanafi/Maliki/Shafi'i/Hanbali)
[Q:2:255]
Quran citation chip (Surah:Ayah)
[B:5527] [M:1406]
Bukhari / Muslim hadith chips
[CODE:python]...[/CODE]
Code block with copy button
[BRAIN:X] [CONF:N]
Brain mode + confidence % — end of answer

The LML → HTML renderer (included in the model README) converts this into a beautiful dark-mode HTML page with madhab tabs, source chips, collapsible sections, copy buttons, and a confidence bar. One .html file — zero dependencies.

💬 Sample Answer Format

Here's what a typical Noor-Al-Ilm response looks like on a fiqh question. Ruling badges appear first, then structured sections, then madhab positions, then citations:

HALAL after proper zabiha & quarantine if jallalah.

[ANS] Chicken is halal if slaughtered with bismillah. A jallalah chicken (fed blood/bone meal) is HARAM until quarantined 3 days on clean feed. [/ANS]

[WHY] [Q:5:3] prohibits consuming what is filthy. Blood and bone meal are najasah. [/WHY]

[MADHABS][HAN] Makruh tahreemi until 3-day quarantine [/HAN] [MAL] Haram until cleansed [/MAL] [/MADHABS]

[BRAIN:mufti] [CONF:95] [LEVEL:intermediate]

❓ Frequently Asked Questions

Is Noor-Al-Ilm free to use?
Yes. Noor-Al-Ilm is fully open-source under the MIT license. The model weights, LoRA adapters, GGUF files, and training dataset are all freely available on HuggingFace. You can download, use, modify, and redistribute it.
Which madhab does Noor-Al-Ilm follow?
Noor-Al-Ilm does not follow a single madhab — it presents the positions of all four Sunni madhabs (Hanafi, Maliki, Shafi'i, Hanbali) and clearly labels each one using the [MADHABS] tab system. It follows the Ash'ari/Maturidi aqeedah tradition and the methodology of SeekersGuidance scholars.
Can I use it without a GPU?
Yes. The GGUF format is designed for CPU inference via Ollama. You can run it on a regular laptop without a GPU, though it will be slower. For fast GPU inference, use the LoRA adapters with Unsloth on Google Colab (free T4 GPU).
What is IDRAG and why does it matter?
IDRAG (Islamic Data RAG) is a retrieval-augmented generation pipeline built into the inference code. Before generating an answer, it searches a FAISS vector index of the full training dataset (Quran + Hadith + Fatawa) for the most relevant passages and feeds them as context to the model. This dramatically reduces hallucination and ensures answers cite real Islamic sources.
Is this a fatwa-issuing service?
No. Noor-Al-Ilm is an educational AI tool — it is not a muftī and its outputs should not be treated as official fatwas. For personal decisions affecting your deen and life, always consult a qualified Islamic scholar directly. The model is best used for learning, research, and exploring Islamic knowledge.
How was the model trained?
The model was trained in three progressive versions on Google Colab using a free T4 GPU. v1 was a fresh fine-tune of Qwen2.5-7B-Instruct. v2 continued for 3 more epochs at a lower learning rate. v3 extended to 5 epochs with max sequence length 2048. All training used LoRA (r=16, alpha=32) via the Unsloth library for memory efficiency.

🏛️ About OpenNoorIlm

OpenNoorIlm is an independent Islamic AI research initiative building free, open-source AI tools for the Muslim Ummah. We believe that authentic Islamic knowledge should be accessible to everyone — in any language, on any device, at any time — through AI that is grounded in classical scholarship, properly attributed, and given freely for the sake of Allah.

Our approach is rooted in the traditional Sunni scholarly tradition: the Ash'ari/Maturidi aqeedah, all four madhabs, and verified sources from trusted scholars and institutions like SeekersGuidance.

Try Noor-Al-Ilm Today

Free, open-source, and built for the Ummah. Download the model, explore the dataset, or contribute on HuggingFace.

بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيمِ  ·  Noor-Al-Ilm by OpenNoorIlm  ·  Base: Qwen2.5-7B-Instruct  ·  MIT License  ·  Free for the Ummah

Comments

Popular posts from this blog

New Update in Upcoming Noor Ul Ilm 2.0 22-03-2026