Instructions to use OpenNoorIlm/Noor-ul-ilm-7B-Qwen-15-3-2026-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenNoorIlm/Noor-ul-ilm-7B-Qwen-15-3-2026-GGUF with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("OpenNoorIlm/Noor-ul-ilm-7B-Qwen-15-3-2026-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use OpenNoorIlm/Noor-ul-ilm-7B-Qwen-15-3-2026-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf OpenNoorIlm/Noor-ul-ilm-7B-Qwen-15-3-2026-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf OpenNoorIlm/Noor-ul-ilm-7B-Qwen-15-3-2026-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf OpenNoorIlm/Noor-ul-ilm-7B-Qwen-15-3-2026-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf OpenNoorIlm/Noor-ul-ilm-7B-Qwen-15-3-2026-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf OpenNoorIlm/Noor-ul-ilm-7B-Qwen-15-3-2026-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf OpenNoorIlm/Noor-ul-ilm-7B-Qwen-15-3-2026-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf OpenNoorIlm/Noor-ul-ilm-7B-Qwen-15-3-2026-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf OpenNoorIlm/Noor-ul-ilm-7B-Qwen-15-3-2026-GGUF:Q4_K_M
Use Docker
docker model run hf.co/OpenNoorIlm/Noor-ul-ilm-7B-Qwen-15-3-2026-GGUF:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use OpenNoorIlm/Noor-ul-ilm-7B-Qwen-15-3-2026-GGUF with Ollama:
ollama run hf.co/OpenNoorIlm/Noor-ul-ilm-7B-Qwen-15-3-2026-GGUF:Q4_K_M
- Unsloth Studio
How to use OpenNoorIlm/Noor-ul-ilm-7B-Qwen-15-3-2026-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for OpenNoorIlm/Noor-ul-ilm-7B-Qwen-15-3-2026-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for OpenNoorIlm/Noor-ul-ilm-7B-Qwen-15-3-2026-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for OpenNoorIlm/Noor-ul-ilm-7B-Qwen-15-3-2026-GGUF to start chatting
- Pi
How to use OpenNoorIlm/Noor-ul-ilm-7B-Qwen-15-3-2026-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf OpenNoorIlm/Noor-ul-ilm-7B-Qwen-15-3-2026-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "OpenNoorIlm/Noor-ul-ilm-7B-Qwen-15-3-2026-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use OpenNoorIlm/Noor-ul-ilm-7B-Qwen-15-3-2026-GGUF with Docker Model Runner:
docker model run hf.co/OpenNoorIlm/Noor-ul-ilm-7B-Qwen-15-3-2026-GGUF:Q4_K_M
- Lemonade
How to use OpenNoorIlm/Noor-ul-ilm-7B-Qwen-15-3-2026-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull OpenNoorIlm/Noor-ul-ilm-7B-Qwen-15-3-2026-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Noor-ul-ilm-7B-Qwen-15-3-2026-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use OpenNoorIlm/Noor-ul-ilm-7B-Qwen-15-3-2026-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf OpenNoorIlm/Noor-ul-ilm-7B-Qwen-15-3-2026-GGUF:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default OpenNoorIlm/Noor-ul-ilm-7B-Qwen-15-3-2026-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use OpenNoorIlm/Noor-ul-ilm-7B-Qwen-15-3-2026-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf OpenNoorIlm/Noor-ul-ilm-7B-Qwen-15-3-2026-GGUF:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "OpenNoorIlm/Noor-ul-ilm-7B-Qwen-15-3-2026-GGUF:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Create README.md
Browse files---
license: mit
language:
- en
- ar
- ur
base_model: Qwen/Qwen2.5-7B-Instruct
pipeline_tag: text-generation
tags:
- islamic
- quran
- hadith
- tafsir
- fiqh
- lora
- unsloth
- qwen2.5
- arabic
- urdu
- noor-al-ilm
- opennoorilm
datasets:
- OpenNoorIlm/Noor-Ul-Ilm-1.0-Qwen2.5-7B-training-dataset-15-03-2026
library_name: transformers
---
<div align="center">
# π Noor-Al-Ilm β ΩΩΨ± Ψ§ΩΨΉΩΩ
### *Light of Knowledge β An Islamic AI for the Ummah*
**Fine-tuned by [OpenNoorIlm](https://huggingface.co/OpenNoorIlm)**
[](https://opensource.org/licenses/MIT)
[](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct)
[](/)
[](https://huggingface.co/datasets/OpenNoorIlm/Noor-Ul-Ilm-1.0-Qwen2.5-7B-training-dataset-15-03-2026)
</div>
---
## π About Noor-Al-Ilm
**Noor-Al-Ilm** (ΩΩΨ± Ψ§ΩΨΉΩΩ
, *Light of Knowledge*) is a fine-tuned Islamic AI assistant that provides accurate, citation-backed answers across the full spectrum of Islamic knowledge β Quran, Hadith, Tafsir, Fiqh, Islamic history, and general Islamic guidance.
Built on **Qwen2.5-7B-Instruct** and fine-tuned by **OpenNoorIlm** using curated classical Islamic texts, verified fatawa from traditional Sunni scholars, and custom instruction-tuning seeds. It features a unique **IDRAG** (Islamic Data RAG) pipeline that enriches every answer with locally retrieved Quran ayahs, hadiths, and fatawa before generation.
---
## ποΈ About OpenNoorIlm
**OpenNoorIlm** is an independent Islamic AI research initiative. Our mission is to make authentic Islamic knowledge accessible through intelligent, respectful, and well-attributed AI systems rooted in traditional Sunni scholarship β following the Ash'ari/Maturidi aqeedah and all four madhabs (Hanafi, Maliki, Shafi'i, Hanbali).
---
## π§ Model Details
| Detail | Value |
|--------|-------|
| **Model Name** | Noor-Al-Ilm |
| **Base Model** | [Qwen/Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct) |
| **Fine-tuned by** | OpenNoorIlm |
| **Fine-tuning Method** | LoRA via Unsloth (r=16, alpha=32) |
| **Training Versions** | v1 β v2 (3 epochs, seq 512) β v3 (5 epochs, seq 2048) |
| **Output Format** | GGUF (Ollama) + LoRA adapters |
| **Languages** | English (primary), Arabic terms, Urdu reference |
| **Max Sequence Length** | 2048 |
---
## π Training Datasets
| Dataset | Description | Records | License |
|---------|-------------|---------|---------|
| Quran β Saheeh International (EN) | Complete Quran, English translation | ~6,236 ayahs | Public Domain |
| Kanzul Iman β Urdu | Imam Ahmad Raza Khan (d.1921) | ~6,236 ayahs | Public Domain |
| Tafsir al-Jalalayn | al-Mahalli & al-Suyuti (15th C.) | ~6,200 ayahs | Public Domain |
| Sahih al-Bukhari | Most authentic hadith collection | 7,277 hadiths | Public Domain |
| Sahih Muslim | Second most authentic collection | 7,459 hadiths | Public Domain |
| SeekersGuidance Fatawa | Sheikh Faraz Rabbani & scholars β all 4 madhabs | 260+ fatawa | Attributed |
| OpenNoorIlm Seeds | Custom instruction-tuning QA pairs | varies | MIT |
Full dataset: [OpenNoorIlm/Noor-Ul-Ilm-1.0-Qwen2.5-7B-training-dataset-15-03-2026](https://huggingface.co/datasets/OpenNoorIlm/Noor-Ul-Ilm-1.0-Qwen2.5-7B-training-dataset-15-03-2026)
---
## π Capabilities
Noor-Al-Ilm operates in a **Three-Brain System**:
| Mode | Tag | Scope |
|------|-----|-------|
| π **Mufti Brain** | `[BRAIN:mufti]` | Halal/Haram, fiqh, worship, Islamic ethics |
| π **Scholar Brain** | `[BRAIN:scholar]` | Islamic history, scholars, dynasties, books |
| π **Dunyawi Brain** | `[BRAIN:dunyawi]` | Science, math, coding, general knowledge |
---
## π Inference
### Option 1 β Ollama (GGUF, simplest)
```bash
ollama run OpenNoorIlm/Noor-ul-ilm-7B-Qwen
```
---
### Option 2 β Unsloth (Fast, recommended for Colab / GPU)
```python
# !pip install -q 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,
dtype = None,
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 so the user has ZERO remaining questions.
Write in ENGLISH ONLY. Arabic Islamic terms are fine.
Start immediately with [ANS], [HALAL], [HARAM], or [FARD]. Never echo instructions."""
def ask(question, max_new_tokens=600):
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")
with torch.no_grad():
outputs = model.generate(
input_ids = inputs,
max_new_tokens = max_new_tokens,
temperature = 0.7,
top_p = 0.9,
repetition_penalty = 1.15,
do_sample = True,
pad_token_id = tokenizer.eos_token_id,
)
return tokenizer.decode(
outputs[0][inputs.shape[1]:], skip_special_tokens=True
).strip()
print(ask("Is cryptocurrency trading halal?"))
```
---
### Option 3 β Full IDRAG Pipeline (RAG + Web, as used in training)
> Complete production pipeline: FAISS vector retrieval over the full dataset + DuckDuckGo Sunni web search β enriched context β generation β LML cleanup.
```python
# !pip install -q unsloth faiss-cpu sentence-transformers requests beautifulsoup4 lxml
from unsloth import FastLanguageModel
import torch, re, os, pickle
import faiss, requests
from bs4 import BeautifulSoup
from sentence_transformers import SentenceTransformer
# ββ Load model βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "OpenNoorIlm/Noor-ul-ilm-7B-Qwen-15-3-2026",
max_seq_length = 2048,
dtype = None,
load_in_4bit = True,
)
FastLanguageModel.for_inference(model)
# ββ LML cleanup ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
_FALLBACK = '[ANS] Please try rephrasing your question. [/ANS]\n\n[BRAIN:mufti] [CONF:50] [LEVEL:basic]'
_RE_HASH3 = re.compile(r'###\s*\[')
_RE_HASH2 = re.compile(r'##\s*\[')
_RE_CJK = re.compile('[\u4e00-\u9fff\u3040-\u30ff\uac00-\ud7af]+')
_RE_META2 = re.compile(r'\[BRAIN:\w+\]')
_RE_SPAM = re.compile(r'(.)\1{20,}')
_RE_CRANE = re.compile(r'\[CRANE:[^\]]*\].*?\[/CRANE\]', re.DOTALL)
_RE_INSTR = re.compile(
r'(β{6,}|LML TAGS\s*[ββ-]|THREE BRAIN MODES|NEVER write ###'
r'|COMPLETE PROMPT START|COMPLETE PROMPT END)',
re.IGNORECASE
)
def clean_lml(text):
text = _RE_HASH3.sub('[', text)
text = _RE_HASH2.sub('[', text)
text = _RE_CRANE.sub('', text)
if _RE_SPAM.search(text):
return _FALLBACK
m = _RE_INSTR.search(text)
if m:
cut = text[:m.start()].rstrip()
text = cut if len(cut) > 80 else _FALLBACK
if not _RE_META2.search(text):
text += '\n\n[BRAIN:mufti] [CONF:70] [LEVEL:basic]'
text = _RE_CJK.sub('', text)
return text.strip()
# ββ IDRAG: FAISS vector retrieval ββββββββββββββββββββββββββββββββββββββββββ
RAG_INDEX = '/content/noor_rag' # path to your pre-built FAISS index
_idx, _chunks, _emb = None, None, None
def _load_faiss():
global _idx, _chunks, _emb
if _idx is not None: return
ip = f'{RAG_INDEX}/index.faiss'
cp = f'{RAG_INDEX}/chunks.pkl'
if not os.path.exists(ip): return
_idx = faiss.read_index(ip)
with open(cp, 'rb') as f: _chunks = pickle.load(f)
_emb = SentenceTransformer('all-MiniLM-L6-v2')
print(f'IDRAG: {_idx.ntotal} vectors loaded')
def _retrieve_local(q, top_k=8):
_load_faiss()
if _idx is None: return []
vec = _emb.encode([q], normalize_embeddings=True).astype('float32')
D, I = _idx.search(vec, top_k)
return [_chunks[i] for d, i in zip(D[0], I[0]) if i >= 0 and d >= 0.25]
# ββ IDRAG: Sunni web search ββββββββββββββββββββββββββββββββββββββββββββββββ
_SUNNI = ['seekersguidance.org','islamqa.info','daruliftaa.com',
'muftionline.co.za','islamweb.net','abuaminaelias.com']
def _web_search(q, n=3):
try:
sf = ' OR '.join(f'site:{s}' for s in _SUNNI)
url = f'https://html.duckduckgo.com/html/?q={requests.utils.quote(q+" ("+sf+")")}'
r = requests.get(url, headers={'User-Agent':'NoorAlIlm/1.0'}, timeout=8)
if r.status_code != 200: return []
soup = BeautifulSoup(r.text, 'html.parser')
out = []
for res in soup.select('.result')[:n]:
t = res.select_one('.result__title')
s = res.select_one('.result__snippet')
if t and s:
out.append({'title': t.get_text(strip=True),
'snippet': s.get_text(strip=True)})
return out
except Exception:
return []
def build_context(question):
parts = []
local = _retrieve_local(question)
if local:
parts.append('ββ Relevant Islamic Sources ββ')
for c in local: parts.append(f"β’ {c['text'][:400]}")
web = _web_search(question)
if web:
parts.append('\nββ Sunni Scholar Guidance ββ')
for w in web: parts.append(f"β’ {w['title']}: {w['snippet'][:
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
datasets:
|
| 4 |
+
- OpenNoorIlm/Noor-Ul-Ilm-1.0-Qwen2.5-7B-training-dataset-15-03-2026
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
- ar
|
| 8 |
+
base_model:
|
| 9 |
+
- Qwen/Qwen2.5-7B-Instruct
|
| 10 |
+
library_name: transformers
|
| 11 |
+
tags:
|
| 12 |
+
- islamic
|
| 13 |
+
- quran
|
| 14 |
+
- hadith
|
| 15 |
+
- fiqh
|
| 16 |
+
- lora
|
| 17 |
+
- unsloth
|
| 18 |
+
- qwen2.5
|
| 19 |
+
---
|