Help preserve open and free AI for humanity's future

← All models

QCRI_Fanar-1-9B-Instruct

QCRI · View on Hugging Face ↗

Fanar 1 — Qatar Computing Research Institute's Arabic-first instruct LLM (9B), Arabic/English.

✓ verified · rehash-vs-hf-metadata at 2026-08-23T05:40:42Z

apache-2.016.38 GB (17,588,127,121 bytes)transformerssafetensorsgemma2text-generationpytorchconversationaltext-generation-inferenceendpoints_compatible2 languages (ar, en)paper: 2501.13944

Get this model

Download QCRI_Fanar-1-9B-Instruct.torrent

Recommended — the .torrent carries the webseed url-list, so your client can fall back to plain HTTPS if the swarm is thin. See/verify for the full download + verification walkthrough.

Model card

The complete upstream card, rendered from this payload's README.md — the same hash-verified bytes the torrent distributes. Images and off-site links are removed; the original card on Hugging Face carries them.


license: apache-2.0 language:

  • ar
  • en pipeline_tag: text-generation tags:
  • pytorch library_name: transformers base_model: QCRI/Fanar-1-9B

Fanar-1-9B-Instruct

Fanar-1-9B-Instruct is a powerful Arabic-English LLM developed by Qatar Computing Research Institute (QCRI) at Hamad Bin Khalifa University (HBKU), a member of Qatar Foundation for Education, Science, and Community Development. It is the instruction-tuned version of Fanar-1-9B. We continually pretrain the google/gemma-2-9b model on 1T Arabic and English tokens. We pay particular attention to the richness of the Arabic language by supporting Modern Standard Arabic (MSA) and a diverse set of Arabic dialects, including Gulf, Levantine, and Egyptian. Fanar models, through meticulous curation of the pretraining and instruction-tuning data, are aligned with Islamic values and Arab cultures.

Fanar-1-9B-Instruct is a core component of the Fanar GenAI platform that offers a suite of capabilities including image generation, video and image understanding, deep thinking, advanced text-to-speech (TTS) and automatic-speech-recognition (ASR), attribution and fact-checking, Islamic RAG, among several other features.

We have published a comprehensive report with all the details regarding our Fanar GenAI platform. We also provide an API to our models and the GenAI platform (request access here).


Model Details

Attribute Value
Developed by QCRI at HBKU
Sponsored by Ministry of Communications and Information Technology, State of Qatar
Model Type Autoregressive Transformer
Parameter Count 8.7 Billion
Context Length 4096 Tokens
Input Text only
Output Text only
Training Framework LitGPT
Pretraining Token Count 1 Trillion (ar + en)
SFT Instructions 4.5M
DPO Preference Pairs 250K
Languages Arabic, English
License Apache 2.0

Model Training

Pretraining

Fanar-1-9B-Instruct was continually pretrained on 1T tokens, with a balanced focus on Arabic and English: ~515B English tokens from a carefully curated subset of the Dolma dataset, 410B Arabic tokens that we collected, parsed, and filtered from a variety of sources, and 102B code tokens curated from The Stack dataset. Our codebase used the LitGPT framework.

Post-training

Fanar-1-9B-Instruct underwent a two-phase post-training pipeline:

Phase Size
Supervised Fine-tuning (SFT) 4.5M Instructions
Direct Preference Optimization (DPO) 250K Preference Pairs

Getting Started

Fanar-1-9B-Instruct is compatible with the Hugging Face transformers library (≥ v4.40.0). Here's how to load and use the model:

from transformers import AutoTokenizer, AutoModelForCausalLM

model_name = "QCRI/Fanar-1-9B-Instruct"

tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto")

# message content may be in Arabic or English
messages = [
    {"role": "user", "content": "ما هي عاصمة قطر؟"},
]

inputs = tokenizer.apply_chat_template(messages, tokenize=False, return_tensors="pt")
outputs = model.generate(**tokenizer(inputs, return_tensors="pt", return_token_type_ids=False), max_new_tokens=256)

print(tokenizer.decode(outputs[0], skip_special_tokens=True))

Inference using VLLM is also supported:


from vllm import LLM, SamplingParams

model_name = "QCRI/Fanar-1-9B-Instruct"

llm = LLM(model=model_name)
sampling_params = SamplingParams(temperature=0.7, max_tokens=256)

# message content may be in Arabic or English
messages = [
    {"role": "user", "content": "ما هي عاصمة قطر؟"},
]

outputs = llm.chat(messages, sampling_params)
print(outputs[0].outputs[0].text)

Intended Use

Fanar-1-9B-Instruct is built for:

  • Conversational agents (Arabic only or bilingual)
  • Cultural and dialectal question answering in Arabic
  • Educational, governmental, and civic NLP applications focused on the Arab world or Arabic-speaking audiences
  • Research on Arabic natural language generation and understanding

Fanar-1-9B-Instruct can be deployed as part of a broader AI system. Developers are encouraged to implement proper safeguards to ensure culturally respectful, accurate, and safe deployment. It should not be used to generate or spread harmful, illegal, or misleading content.

A version of this model can be accessed through Fanar Chat. We are continuously improving the Fanar’s models and capabilities, and answers can differ from what you get from Fanar-1-9B-Instruct.


Ethical Considerations & Limitations

Fanar-1-9B-Instruct is capable of generating fluent and contextually appropriate responses. However, as with any generative model there are uncertainities. The model may produce biased, offensive, or incorrect outputs. The model is not suitable for high-stakes decision-making (e.g., legal, medical, or financial advice). Though we have extensively tested Fanar-1-9B-Instruct and attempted to mitigate these issues, we cannot redress every possible scenario. Thus, we advise developers to implement safety checks and perform domain-specific fine-tuning for sensitive use cases. Kindly refer to our Terms of Service and Privacy Policy.

The output generated by this model is not considered a statement of QCRI, HBKU, Qatar Foundation, MCIT or any other organization or individual.


Evaluation

Evaluation was conducted using a modified version of the LM Evaluation Harness and internal cultural alignment benchmarks.

Model MMLU (5-shot) MMMLU (Arabic) (0-shot) ArabicMMLU (3-shot) HellaSwag (0-shot) PIQA (0-shot) ARC Challenge (0-shot) Belebele (Arabic) (3-shot) ACVA (5-shot) GSM8k OALL (0-shot) OALL v2 (0-shot) Almieyar Arabic (3-shot) Arab Cultural MCQ (3-shot) AraDiCE PIQA (MSA) (0-shot) AraDiCE PIQA(Egy) (0-shot) AraDiCE PIQA(Lev) (0-shot) AraDiCE ArabicMMLU(Egy) (0-shot) AraDiCE ArabicMMLU(Lev) (0-shot)
Fanar-1-9B-it 71.53% 58.89% 67.69% 83.16% 82.54% 67.15% 83.22% 80.02% 74.60% 68.32% 66.29% 78.68% 72.40% 67.68% 63.66% 59.03% 59.63% 60.62%
ALLaM-7B-Instruct-preview 60.72% 54.89% 68.59% 76.35% 80.52% 51.62% 75.80% 74.52% 46.63% 57.31% 63.66% 76.31% 74.20% 67.52% 63.44% 60.88% 62.50% 64.17%
aya-expanse-8b 62.85% 47.14% 60.10% 78.54% 81.18% 56.40% 70.78% 77.11% 8.26% 53.18% 59.74% 70.20% 67.30% 63.00% 59.41% 56.53% 53.52% 53.71%
c4ai-command-r7b-arabic-02-2025 66.91% 49.54% 63.06% 74.67% 78.02% 49.15% 72.78% 79.80% 30.33% 49.38% 64.44% 73.82% 69.20% 62.30% 60.99% 56.69% 54.78% 56.06%
AceGPT-v2-8B-Chat 66.45% 51.16% 62.61% 79.21% 80.58% 53.50% 74.56% 77.66% 41.77% 50.16% 60.40% 74.31% 68.90% 64.58% 61.32% 56.91% 54.53% 53.91%
gemma-2-9b-it 71.65% 57.93% 64.16% 79.06% 79.38% 63.99% 78.31% 80.67% 60.95% 56.11% 64.21% 73.69% 68.60% 61.26% 59.96% 57.24% 57.95% 59.25%
jais-adapted-13b-chat 56.64% 44.45% 58.97% 80.86% 80.47% 54.27% 67.52% 75.24% 44.05% 46.41% 56.56% 65.46% 65.30% 61.10% 58.05% 55.77% 52.87% 53.59%
jais-family-6p7b-chat 49.42% 41.59% 55.80% 72.04% 74.05% 44.62% 65.11% 72.04% 53.68% 48.20% 54.73% 61.72% 64.10% 62.51% 60.12% 57.24% 49.11% 47.49%
Llama-3.1-8B-Instruct 68.04% 47.58% 59.05% 79.22% 80.74% 55.29% 66.72% 76.67% 29.26% 47.81% 55.97% 69.70% 66.10% 58.11% 55.39% 54.24% 46.86% 47.52%
Qwen2.5-7B-Instruct 74.21% 55.63% 63.96% 80.44% 79.92% 55.03% 74.61% 78.09% 71.34% 54.19% 62.69% 75.69% 68.10% 60.55% 58.65% 56.04% 48.74% 53.42%

Citation

If you use Fanar-1-9B-Instruct or the Fanar GenAI system in your research or applications, please cite:

@misc{fanarllm2025,
      title={Fanar: An Arabic-Centric Multimodal Generative AI Platform}, 
      author={Fanar Team and Ummar Abbas and Mohammad Shahmeer Ahmad and Firoj Alam and Enes Altinisik and Ehsannedin Asgari and Yazan Boshmaf and Sabri Boughorbel and Sanjay Chawla and Shammur Chowdhury and Fahim Dalvi and Kareem Darwish and Nadir Durrani and Mohamed Elfeky and Ahmed Elmagarmid and Mohamed Eltabakh and Masoomali Fatehkia and Anastasios Fragkopoulos and Maram Hasanain and Majd Hawasly and Mus'ab Husaini and Soon-Gyo Jung and Ji Kim Lucas and Walid Magdy and Safa Messaoud and Abubakr Mohamed and Tasnim Mohiuddin and Basel Mousi and Hamdy Mubarak and Ahmad Musleh and Zan Naeem and Mourad Ouzzani and Dorde Popovic and Amin Sadeghi and Husrev Taha Sencar and Mohammed Shinoy and Omar Sinan and Yifan Zhang and Ahmed Ali and Yassine El Kheir and Xiaosong Ma and Chaoyi Ruan}},
      year={2025},
      url={https://arxiv.org/abs/2501.13944}, 
}

Acknowledgements

This project is from Qatar Computing Research Institute (QCRI) at Hamad Bin Khalifa University (HBKU), a member of Qatar Foundation. We thank our engineers, researchers, and support team for their efforts in advancing Arabic-centric large language models. Special thanks to the Ministry of Communications and Information Technology, State of Qatar for their continued support by providing the compute infrastructure through the Google Cloud Platform.


License

This model is licensed under the Apache 2.0 License.

Magnet link (secondary — no webseeds)

Opens the swarm directly, but carries no webseed url-list. Prefer the.torrent download above — HTTP fallback seeds ride inside it.

magnet:?xt=urn:btih:d80cbde0443d1ba236908bde17da9ce53b7926ae&dn=QCRI_Fanar-1-9B-Instruct

Open magnet in torrent client · infohash d80cbde0443d1ba236908bde17da9ce53b7926ae

Files & hashes

PathSizeMethodHash
README.md11.2 KB (11,450 B)sha1-git-blob20b514445e81885def1946f43394f0601eda8ca6
config.json900 B (900 B)sha1-git-blob783aeabc4d6bffd04467a0cf769f5ad7fbd7d465
fanar_logo.jpg36.7 KB (37,615 B)sha1-git-bloba7d1718e949cf819756c5c97fdfaa4f0646580eb
generation_config.json168 B (168 B)sha1-git-blobf4d8698503667257881387c38cde9e77efe84c9b
model-00001-of-00004.safetensors4.63 GB (4,971,336,848 B)sha256-lfse22a1923e8294ae2687473100309fba9dea083c757ea696e17fc4cad676c93ef
model-00002-of-00004.safetensors4.62 GB (4,962,221,464 B)sha256-lfs814c0ef4b6f80f64d1d8445868a1af1a98f9c410662ee8dd4579dcebba4e6dc1
model-00003-of-00004.safetensors4.61 GB (4,947,570,888 B)sha256-lfsebf3792efddad66b8c29add6e2bf37fade59d1fc82681efcee1586e438aaf6ce
model-00004-of-00004.safetensors2.50 GB (2,686,668,256 B)sha256-lfs8599cf6fc95839a31efc4fa7f265d4ca275c93dbede589a877f277062f980d29
model.safetensors.index.json38.2 KB (39,072 B)sha1-git-blob43b3b8b1109fb5390a123506dbbcbd72f9937252
special_tokens_map.json555 B (555 B)sha1-git-blobf6119589e367b2de0fc8cbd2f1217667532e3174
tokenizer.json17.2 MB (18,068,035 B)sha256-lfs21cf92b1210853eb91fb856a67b6062b06578194cac590326c8e56af7ec71d88
tokenizer.model2.0 MB (2,124,704 B)sha256-lfsc689fef08039792f515e5bcd67759b3bd73f845d8e7f0fda75471c6a103aad41
tokenizer_config.json46.1 KB (47,166 B)sha1-git-blob22a2fbfd32bb877b384e0fa6fff9f21d4088e627

Provenance

Upstream repositoryQCRI/Fanar-1-9B-Instruct
Revision (pinned)d30938d0efb1fd251727ee96df6987802ff84662
Fetched at2026-08-23T05:19:08Z
License at fetchapache-2.0
Snapshot toolhuggingface · seedbank 0.1.0

Trackers

Webseeds