Model reference · open weights
Fanar-1 is an open-weight language model from QCRI. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.
Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.
What it is
| Released by | QCRI |
|---|---|
| Type | Language models |
| Task | Text gen |
| Parameters (lead) | 8.8B |
| Context | 4k tokens |
| Runs with | transformers |
| Based on | QCRI/Fanar-1-9B |
| Released | 2025-06-01 |
| Popularity | 159k downloads / month |
| Licence | Open weights |
About
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).
| 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 |
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.
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 |
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)
Fanar-1-9B-Instruct is built for:
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.
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
From the published model card. Full card on the HuggingFace links in the sidebar.
Using it via the API
Once AxForge deploys fanar-1 for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (fanar-1 below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/chat/completions \
-H "Authorization: Bearer $AXFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"fanar-1","messages":[{"role":"user","content":"Hello"}]}'
Create an account — your API key is available in the console. 3M free tokens every 30 days with every new account.