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
🌟 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
| Detail | Value |
|---|---|
| Model Name | Noor-Al-Ilm (نور العلم) |
| Base Model | Qwen/Qwen2.5-7B-Instruct |
| Fine-tuned by | OpenNoorIlm |
| Method | LoRA via Unsloth (r=16, alpha=32) |
| Training | v1 → v2 (3 epochs) → v3 (5 epochs, seq 2048) |
| Output Formats | GGUF (Ollama-ready) + LoRA adapters |
| Languages | English (primary) · Arabic terms · Urdu reference |
| Max Seq Length | 2048 tokens |
| License | MIT (open source) |
| HuggingFace | huggingface.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.
🧩 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:
🚀 How to Use Noor-Al-Ilm
Option 1 — Ollama (Easiest, No Coding Required)
If you have Ollama installed, run this in your terminal:
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:
# 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:
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:
[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?
Which madhab does Noor-Al-Ilm follow?
Can I use it without a GPU?
What is IDRAG and why does it matter?
Is this a fatwa-issuing service?
How was the model trained?
🏛️ 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.
Comments
Post a Comment