DEV.co
Open-Source LLM · QCRI

Fanar-1-9B-Instruct

Fanar-1-9B-Instruct is a 9B-parameter instruction-tuned LLM developed by Qatar Computing Research Institute (QCRI) for Arabic-English bilingual conversational tasks. It was continually pretrained on 1 trillion tokens (Arabic, English, and code) and fine-tuned with 4.5M supervised instructions and 250K DPO preference pairs. The model supports Modern Standard Arabic (MSA) and multiple dialects (Gulf, Levantine, Egyptian). It is open-source under Apache 2.0 license, not gated, and compatible with HuggingFace transformers and vLLM. Intended use includes conversational agents, cultural QA, and Arabic NLP research; not suitable for high-stakes decisions.

Source: HuggingFace — huggingface.co/QCRI/Fanar-1-9B-Instruct
8.8B
Parameters
apache-2.0
License (OSI-approved)
Unknown
Context (tokens)
65k
Downloads (30d)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
DeveloperQCRI
Parameters8.8B
Context windowUnknown
Licenseapache-2.0 — OSI-approved
Modality / tasktext-generation
Gated on HuggingFaceNo
Downloads65k
Likes33
Last updated2025-07-15
SourceQCRI/Fanar-1-9B-Instruct

What Fanar-1-9B-Instruct is

Fanar-1-9B-Instruct is an autoregressive transformer derived from google/gemma-2-9b via continual pretraining. Architecture: 8.783B parameters, 4096 token context length, text-only I/O. Training: 1T mixed-language tokens (515B English, 410B Arabic, 102B code), using LitGPT framework. Post-training: 2-phase (SFT + DPO). Inference: Compatible with transformers (≥v4.40.0) and vLLM. Format: SafeTensors, PyTorch. MMLU (5-shot): 71.53%; strong performance on Arabic-specific benchmarks (MMMLU-Arabic 58.89%, ArabicMMLU 67.69%, Belebele-Arabic 83.22%). Model last modified 2025-07-15.

Quickstart

Run Fanar-1-9B-Instruct locally

Load the open weights with 🤗 Transformers and generate — the same model, self-hosted.

quickstart.pypython
from transformers import pipelinepipe = pipeline("text-generation", model="QCRI/Fanar-1-9B-Instruct")out = pipe("Explain retrieval-augmented generation in one sentence.",           max_new_tokens=128)print(out[0]["generated_text"])

Swap in vLLM or Ollama for production-grade serving. DEV.co can stand up the inference stack.

Deployment

How you'd run it

A typical self-hosted path — open weights, an inference server, your application.

DEV.co builds each layer — from GPU infrastructure to the application.

Best use cases

Bilingual Conversational Agents

Deploy as a chatbot or assistant for Arabic and English-speaking users. Model is instruction-tuned (4.5M SFT instructions) and DPO-aligned for dialogue. Suitable for customer support, educational bots, or cultural knowledge assistants serving Middle East and MENA audiences.

Arabic Cultural & Dialectal QA

Leverage strong Arabic benchmark performance (Belebele-Arabic 83.22%, Almieyar Arabic 78.68%, Arab Cultural MCQ 72.40%) for domain-specific QA in education, government, or civic applications targeting Arabic speakers across regions with dialect variation.

Arabic NLP Research & Experimentation

Model card and arxiv report (2501.13944) provide full transparency on training data, post-training pipeline, and evaluation methodology. Apache 2.0 license and non-gated access enable research reproducibility and fine-tuning for specialized Arabic NLP tasks.

Running & fine-tuning it

Estimated: 18–36 GB VRAM (bfloat16/fp16 inference, single GPU). Quantized versions (int8, int4 via bitsandbytes or similar) would reduce to 9–18 GB. Training on full 1T tokens used LitGPT; per-step memory scales with batch size and sequence length. Inference tested/compatible with vLLM (efficient batching) and standard transformers. No precision specification provided in model card; assume bfloat16 as standard for gemma-2-9b-derived models.

LoRA/QLoRA feasibility: High. Model is Gemma-2-based transformer with standard architecture; well-suited for parameter-efficient tuning via LoRA (rank 8–16, alpha 16–32 typical). No explicit LoRA weights provided, but standard transformers integration enables easy integration with peft library. Supervised fine-tuning already performed at scale (4.5M instructions); domain-specific fine-tuning on 10K–100K examples is practical. DPO tuning also feasible but requires paired preference data. Quantization (4-bit) + LoRA recommended for resource-constrained setups.

When to avoid it — and what to weigh

  • High-Stakes Decision-Making — Model card explicitly states unsuitability for legal, medical, or financial advice. Risk of biased, offensive, or factually incorrect outputs. Do not use for compliance-critical applications or scenarios requiring guaranteed accuracy.
  • Long-Context Applications — Context length is 4096 tokens. Avoid use cases requiring multi-document summarization, extended dialogue history, or long-form content processing without chunking/sliding window strategies.
  • Non-English/Non-Arabic Languages — Trained exclusively on Arabic and English (plus ~102B code tokens). Performance on other languages is not stated or evaluated. Do not assume multilingual capability beyond these two languages.
  • Real-Time, Low-Latency Requirements — 9B model requires significant VRAM (estimated 18–36 GB in fp16/bfloat16). Inference speed depends heavily on hardware and batch size. Not ideal for sub-100ms latency SLAs without quantization or distillation.

License & commercial use

Apache License 2.0 (OSI-approved permissive license). Permits commercial use, modification, distribution, and private use without restriction, provided original license and copyright notice are included. No copyleft requirement. Clear and non-restrictive for both open-source and proprietary deployments.

Commercial use is permitted under Apache 2.0. No gating, no restricted API key requirement for model download. However, model card stipulates ethical deployment responsibilities: developers must implement safety checks and avoid generating harmful, illegal, or misleading content. Output is not attributed to QCRI, HBKU, Qatar Foundation, or MCIT—full liability rests with deploying organization. Consult model card's Terms of Service and Privacy Policy for hosted Fanar Chat service (separate from open-source model). For commercial SaaS or high-risk applications, strongly recommend domain-specific safety validation and fine-tuning.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceModerate
DocumentationStrong
License clarityClear
Deployment complexityModerate
DEV.co fitStrong
Assessment confidenceHigh
Security considerations

Model capability to generate text means risk of prompt injection, adversarial inputs, and jailbreaking. No explicit adversarial robustness testing or red-teaming results published. Model card notes capacity for biased/offensive outputs; mitigation relies on deployer's safety checks. Training data (Dolma, curated Arabic sources, The Stack) not fully attributed—supply-chain transparency is partial. Recommend: rate-limiting, input validation, output filtering for sensitive domains. No claimed vulnerability disclosure process; security issues should be reported to QCRI directly (contact method not specified in provided data).

Alternatives to consider

ALLaM-7B-Instruct-preview

Saudi/regional alternative; smaller (7B vs 9B), supports Arabic+English. MMLU 60.72% vs Fanar 71.53%; stronger on ArabicMMLU (68.59% vs 67.69%) but weaker on most other benchmarks. Lighter resource footprint; check license/gating status independently.

aya-expanse-8b

Multilingual model (100+ languages including Arabic); 8B parameters, no gating. MMLU 62.85%; weaker on Arabic-specific benchmarks (MMMLU-Arabic 47.14%) but broader language coverage. Choose if supporting non-MENA locales required.

gemma-2-9b-it (base)

Underlying base model; no Arabic-specific tuning. MMLU 71.65% (slightly higher than Fanar), but Belebele-Arabic 78.31% vs Fanar 83.22%. Lighter maintenance (Google-backed). If Arabic dialect support not critical, use base gemma-2-9b-it + custom fine-tuning.

Software development agency

Ship Fanar-1-9B-Instruct with senior software developers

Start with vLLM or HuggingFace transformers—Apache 2.0 licensing means no gating. Need guidance on fine-tuning for your Arabic NLP domain, integration, or safety validation? Contact our AI engineering team to architect a custom implementation.

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

Related on DEV.co

Explore the category and the services that help you build with it.

Fanar-1-9B-Instruct FAQ

Can I use this model commercially?
Yes. Apache 2.0 license permits commercial use without restriction. However, you are responsible for implementing safety checks, avoiding harmful/illegal/misleading output, and not attributing generated content to QCRI or its partners. For high-risk use cases (legal, medical, financial), additional validation and fine-tuning are strongly recommended. No license fee or royalty applies.
What hardware do I need to run Fanar-1-9B-Instruct?
Minimum: single GPU with 18–36 GB VRAM (assuming bfloat16 or fp16 precision). RTX 4090, A100 (40GB), H100, or cloud equivalents (AWS p3/p4, GCP A100) are suitable. For CPU-only inference, expect 50–200x slower throughput. 4-bit quantization reduces memory to ~9 GB; 8-bit to ~12–18 GB. Use vLLM or bitsandbytes for efficient inference scaling.
Which Arabic dialects does this model support?
Fanar-1-9B-Instruct supports Modern Standard Arabic (MSA), Gulf, Levantine, and Egyptian dialects, as stated in the model card. Performance is benchmarked on dialect-specific datasets (AraDiCE PIQA, AraDiCE ArabicMMLU); Egyptian and Levantine achieve ~60%, Gulf not separately listed. Best performance on MSA. Dialectal understanding is included but may degrade for very colloquial or mixed-dialect input.
How does Fanar compare to the base Gemma-2-9B?
Fanar adds ~1T additional pretraining tokens (Arabic + English) and 4.5M instruction-tuning examples + 250K DPO pairs. MMLU is 71.53% (Fanar) vs 71.65% (Gemma-2-9B-it), comparable; but Belebele-Arabic is 83.22% vs 78.31%, and Almieyar-Arabic is 78.68% vs 73.69%—significant gains on Arabic. Fanar is a specialist tuning of Gemma-2; use if Arabic/bilingual support is required.

Software developers & web developers for hire

Need help beyond evaluating Fanar-1-9B-Instruct? DEV.co is a software development agency offering software development services and web development for teams of every size. Our software developers and web developers build custom software, web applications, APIs, and open-source llms integrations — and maintain them long-term.

Ready to Deploy Fanar-1-9B-Instruct?

Start with vLLM or HuggingFace transformers—Apache 2.0 licensing means no gating. Need guidance on fine-tuning for your Arabic NLP domain, integration, or safety validation? Contact our AI engineering team to architect a custom implementation.