Run this model with HF Jobs

Run khazarai/Quran-R1 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/khazarai/Quran-R1. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/khazarai/Quran-R1 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/khazarai/Quran-R1. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/khazarai/Quran-R1. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

Model Card for Quran-R1

Model Details

This model is a fine-tuned version of Qwen/Qwen3-0.6B on the musaoc/Quran-reasoning-SFT dataset. It is designed to perform reasoning and question-answering tasks related to the Quran, providing structured reasoning steps along with the final answer.

Model Description

  • Language(s) (NLP): English
  • License: MIT
  • Fine-tuning method: Supervised fine-tuning (SFT)
  • Finetuned from model: Qwen3-0.6B
  • Dataset: musaoc/Quran-reasoning-SFT

Uses

The model is intended for:

  • Educational purposes: Assisting with structured reasoning about Quranic content.
  • Research: Exploring reasoning capabilities of small LLMs fine-tuned on religious text.
  • QA Systems: Providing answers with reasoning traces.

Not intended for:

  • Authoritative religious rulings (fatwas)
  • Sensitive or controversial theological debates
  • High-stakes decision making

Out-of-Scope Use

  • Scope: The model is limited to the reasoning dataset it was trained on. It may not generalize to broader Quranic studies.

Bias, Risks, and Limitations

  • Bias: Outputs reflect dataset biases and may not represent all scholarly interpretations.
  • Hallucination risk: Like all LLMs, it may generate incorrect or fabricated reasoning.
  • Religious sensitivity: Responses may not align with every sect, school, or interpretation. Use with caution in sensitive contexts.

How to Get Started with the Model

Use the code below to get started with the model.

from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("khazarai/Quran-R1")
model = AutoModelForCausalLM.from_pretrained(
    "khazarai/Quran-R1",
    device_map={"": 0}
)

question = "How does the Quran address the issue of parental authority and children’s rights?"

messages = [
    {"role" : "user",   "content" : question}
]
text = tokenizer.apply_chat_template(
    messages,
    tokenize = False,
    add_generation_prompt = True,
    enable_thinking = True,
)

from transformers import TextStreamer
_ = model.generate(
    **tokenizer(text, return_tensors = "pt").to("cuda"),
    max_new_tokens = 512,
    temperature = 0.6,
    top_p = 0.95,
    top_k = 20,
    streamer = TextStreamer(tokenizer, skip_prompt = True)
)

Training Data

Dataset: musaoc/Quran-reasoning-SFT

The Quranic Reasoning Question Answering (QRQA) Dataset is a synthetic dataset designed for experimenting purposes and for training and evaluating models capable of answering complex, knowledge-intensive questions about the Quran with a strong emphasis on reasoning. This dataset is particularly well-suited for Supervised Fine-Tuning (SFT) of Large Language Models (LLMs) to enhance their understanding of Islamic scripture and their ability to provide thoughtful, reasoned responses.

Downloads last month
42
Safetensors
Model size
0.6B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for khazarai/Quran-R1

Finetuned
Qwen/Qwen3-0.6B
Finetuned
(298)
this model
Quantizations
1 model

Dataset used to train khazarai/Quran-R1

Collection including khazarai/Quran-R1