Papers
Topics
Authors
Recent
Search
2000 character limit reached

Fanar-1-9B: Arabic-Centric 9B LLM

Updated 9 July 2026
  • Fanar-1-9B is a first-generation 9B Arabic-centric language model built from the Gemma-2-9B base using continual pre-training and instruction tuning.
  • It employs a decoder-only Transformer architecture with features like RoPE, RMSNorm, and a carefully curated multilingual dataset emphasizing Arabic content.
  • The model serves as a backbone for specialized systems, such as those for Islamic inheritance reasoning, demonstrating robust domain-specific performance.

Fanar-1-9B is the first-generation 9B-class Fanar Arabic LLM line associated with Qatar Computing Research Institute’s Arabic-centric generative AI program. Across the literature, it appears under several closely related names—most prominently Fanar Prime (9B) in the Fanar 1.0 platform report, and Fanar-1-9B, Fanar-1-9B-Instruct, or Fanar-1-9b-instruct in later work. The model is presented as the stronger of the two main Fanar 1.0 text LLMs, built by continual pre-training on Gemma-2-9B, and later reused both as a general-purpose Arabic-centric instruct model and as the base model for specialized downstream systems, including Islamic inheritance reasoning (Team et al., 18 Jan 2025, Team et al., 17 Mar 2026, AL-Smadi, 20 Aug 2025).

1. Identity, naming, and model lineage

The designation Fanar-1-9B is not uniform across papers. In the Fanar platform report, the formal 9B model name is Fanar Prime, described as the platform’s larger reasoning-oriented LLM. In the Fanar 2.0 report, the same model line is referenced explicitly as Fanar Prime (9B), Fanar-1-9b-instruct, Fanar-1-9B, and Fanar-1-9B-Instruct. The later Islamic inheritance paper uses Fanar-1-9B as the base model name and releases a task-adapted checkpoint as Fanar-1-9B-Islamic-Inheritance-Reasoning (Team et al., 18 Jan 2025, Team et al., 17 Mar 2026).

Name in the literature Role or variant Source
Fanar Prime (9B) Fanar 1.0 9B model, continually pretrained on Gemma-2-9B (Team et al., 18 Jan 2025)
Fanar-1-9B Pre-trained base model name used in later work (Team et al., 17 Mar 2026)
Fanar-1-9B-Instruct / Fanar-1-9b-instruct Instruction-tuned or post-trained variant (Team et al., 17 Mar 2026)
Fanar-1-9B-Islamic-Inheritance-Reasoning LoRA-adapted downstream checkpoint for inheritance reasoning (AL-Smadi, 20 Aug 2025)

This naming variability matters because the literature does not formally normalize all aliases. A cautious reading is that Fanar-1-9B denotes the 9B Fanar 1.x line whose platform identity is Fanar Prime, with both base and instruction-tuned forms. The Fanar 2.0 paper makes this lineage explicit by describing Fanar-1-9b-instruct as “the first generation Fanar model, built on top of gemma-2-9b base model using continual pre-training and instruction fine-tuning,” and by contrasting the Fanar 1.0 dual-LLM strategy—Fanar Star (7B) and Fanar Prime (9B)—with the later single-flagship Fanar-27B design (Team et al., 17 Mar 2026).

2. Architecture and training lineage

Fanar-1-9B is described as a decoder-only Transformer derived from Gemma-2-9B through continual pre-training rather than from-scratch training. The Fanar platform report gives the most specific architectural parameters for the 9B line under the name Fanar Prime: 8.78B total parameters, 8.32B non-embedding parameters, 459M embedding parameters, vocabulary size 128,256, model dimension 3584, RMSNorm for both pre- and post-normalization, RoPE positional embeddings, GQA attention, no biases, Approximated GeGLU activation, token batch size ~4.4M, and weight tying: False. The same report states that vocabulary pruning reduced model size from 9.2B to 8.78B by shrinking the original Gemma-2 vocabulary from 250,000 to 128,256 (Team et al., 18 Jan 2025).

The literature is explicit about some absences of detail. The provided Fanar platform text does not cleanly expose the number of layers, attention heads, hidden size or intermediate size, and context length because the relevant table rows are corrupted in the excerpt. The Fanar 2.0 report likewise says that, for Fanar-1-9B, it does not provide a full internal architectural specification such as tokenizer details, positional settings, or exact attention mechanism beyond backbone provenance. In the Islamic inheritance paper, the model is characterized only as a “9-billion parameter causal decoder-only transformer” designed for Arabic and Islamic domain text, and no layer count, hidden size, tokenizer design, pretraining corpus detail, or context length of the base model is supplied there (Team et al., 18 Jan 2025, AL-Smadi, 20 Aug 2025).

The pretraining recipe reported for the 9B line is continual pre-training on a large bilingual-plus-code corpus. For Fanar Prime, the training mixture is 45% Arabic, 45% English, and 10% code. The reported continual pretraining volume is 650B tokens, with results shown from a checkpoint around the 600B token mark. The training schedule uses a two-stage curriculum comprising a single-epoch pretraining phase and a cool-down phase, with the cool-down stage using the same high-quality dataset curated for Fanar Star. The objective is the standard auto-regressive language modeling objective, though no explicit next-token loss formula is printed in the supplied text (Team et al., 18 Jan 2025).

Optimization details are comparatively specific. The reported settings for Fanar Prime pretraining are 100 warmup steps, peak learning rate 8×1068 \times 10^{-6}, minimum learning rate 1×1061 \times 10^{-6}, AdamW with β1=0.9\beta_1 = 0.9, β2=0.95\beta_2 = 0.95, ϵ=1×108\epsilon = 1 \times 10^{-8}, weight decay 0.01, cosine learning-rate schedule, gradient clipping 1.0, gradient-reduce dtype bfloat16, optimizer-state dtype bfloat16, global batch size 1071 samples, and ~4.4M tokens per step. Pretraining used 168 NVIDIA H100 80GB SXM5 GPUs across 21 nodes with 8 GPUs per node, NVLink / NVSwitch intra-node interconnect, bidirectional GPU-GPU bandwidth 900 GB/s, InfiniBand inter-node connectivity, and LitGPT for continual pretraining (Team et al., 18 Jan 2025).

3. Arabic-centric data strategy

The Arabic-centric character of Fanar-1-9B is grounded primarily in data design rather than in a novel transformer block. The Fanar platform report describes an approximately 1 trillion token pretraining corpus with headline composition 50% English, 40% Arabic, and 10% code, corresponding to 513B English tokens, 410B Arabic tokens, and 102.6B code tokens. Arabic data spans Modern Standard Arabic, Classical Arabic, and dialectal Arabic, and includes in-house crawled web documents, news articles, books, Arabic Wikipedia, classical and contemporary Arabic poetry, and in-house machine-translated books, STEM papers, and encyclopedic documents. This corpus design is presented as a response to Arabic data scarcity and to the need for stronger technical and cultural coverage in Arabic (Team et al., 18 Jan 2025).

Arabic augmentation through machine translation is a central element of that strategy. The report states that machine translation was used to expand Arabic knowledge coverage, with Shaheen selected for books, and NLLB 3.3B selected for STEM papers and Wiki Encyclopedia. The same report also notes nearly 50B translated MSA and dialectal Arabic tokens used to enhance Arabic coverage. This suggests that Fanar-1-9B’s Arabic specialization depends substantially on curated bilingual transfer and translation-based enrichment rather than on naturally occurring Arabic web data alone (Team et al., 18 Jan 2025).

The data pipeline is heavily filtered. Heterogeneous raw inputs were normalized into a Dolma-style JSON-record format with fields "id", "text", "metadata", and "quality_signals". Syntactic filtering used 20 quality signals adapted for Arabic-specific orthographic features such as RTL punctuation, Arabic/Hindi digits, diacritics, ligatures, special symbols, and Farsi/decorated characters. Semantic filtering used ASAD to detect offensive or profane language and adult content. Model-based filtering used KenLM perplexity filtering based on an MSA LLM, removing the highest 5% perplexity documents per dataset and, in the last training epoch, also filtering low-perplexity documents that had become “too easy.” An Arabic-native education classifier inspired by FineWeb-Edu removed low-score documents and filtered approximately 20% of the data (Team et al., 18 Jan 2025).

Deduplication is described at substantial scale. The pipeline applies URL deduplication, exact-match deduplication, and approximate-match deduplication using min-wise locality sensitive hashing with gram size 8, number of bands b=12b = 12, band length r=11r = 11, approximate Jaccard threshold 0.8\approx 0.8, and signature length 132. The reported infrastructure for approximate deduplication used 350 CPU cores, peak memory 1TB, and runtime about 12 hours (Team et al., 18 Jan 2025).

The Fanar 2.0 paper reinterprets these first-generation design choices through a quality-over-quantity lens. It states that Fanar 1.0 taught the team that “data quality dominates data quantity in the continual pretraining regime,” and contrasts Fanar 1.0’s ~1T tokens and “Multi-epoch + cool-down” strategy with Fanar 2.0’s ~120B high-quality tokens and “Recipe-based annealing + model merging.” In that retrospective framing, Fanar-1-9B represents the first major Fanar attempt to construct a broad Arabic-centric base model under severe data scarcity constraints (Team et al., 17 Mar 2026).

4. Platform role in Fanar 1.0 and transition to Fanar 2.0

Fanar-1-9B was not introduced as an isolated checkpoint but as one component in a larger Arabic-centric multimodal generative AI platform developed at Qatar Computing Research Institute (QCRI), Hamad Bin Khalifa University, and sponsored by Qatar’s Ministry of Communications and Information Technology. In Fanar 1.0, the two core text LLMs are Fanar Star and Fanar Prime, deployed concurrently and routed through a custom-built Orchestrator. The routing policy described in the platform report assigns Fanar Prime to STEM and reasoning-related prompts, while other requests may be routed to Fanar Star or to specialized services such as Islamic RAG, Recency RAG, Biography RAG, Attribution RAG, speech, image generation, translation, and embeddings (Team et al., 18 Jan 2025).

This platform framing is important for interpreting the 9B model’s capabilities. Several functions often associated informally with “Fanar” are not intrinsic properties of Fanar-1-9B itself. The Islamic RAG, Recency RAG, Biography RAG, Attribution RAG, safety filters, and orchestrator belong to the surrounding system rather than to the 9B checkpoint. In particular, the platform report distinguishes the core model from external factuality and religious-answer safeguards: Islamic prompts are grounded by a dedicated Islamic RAG, while attribution is implemented as an opt-in post-generation service rather than as a modification of the base model (Team et al., 18 Jan 2025).

The Fanar 2.0 paper presents the 9B line primarily as a first-generation baseline and predecessor. It states that the “most significant architectural shift” is the move from the Fanar 1.0 dual-LLM strategyFanar Star at 7B and Fanar Prime at 9B—to a single flagship Fanar-27B model built by continual pre-training on Gemma-3-27B. In this comparison, Fanar 1.0 is characterized by an 8K context window, absence of selective reasoning traces, absence of hallucination self-verification traces, absence of tool calling, a post-training pipeline of SFT + DPO, translation-based traces for Arabic reasoning, and SFT-based cultural alignment. The 9B model therefore occupies a historically specific position: it is the stronger Fanar 1.0 core LLM, but one later superseded in the flagship role by Fanar-27B (Team et al., 17 Mar 2026).

The same later paper also shows that the 9B line continued to be useful as an experimental substrate. In the agentic section, Fanar-1-9B and Fanar-1-9B-Instruct are explicitly fine-tuned to study tool-calling behavior. This does not imply that tool-calling was a native Fanar 1.0 capability; rather, it indicates that the first-generation 9B base and post-trained variants remained viable research models even after the platform’s main text role had shifted to Fanar-27B (Team et al., 17 Mar 2026).

5. General-purpose benchmark profile

The benchmark evidence portrays Fanar-1-9B as a strong first-generation Arabic-centric model for its size, with particularly strong results on Arabic, cultural, and dialectal tasks, while still lagging the later Fanar-27B across most categories. In the Fanar 2.0 evaluation tables, Fanar-1-9b-instruct records 58.30 on MMMLU/Ar (0-shot), 67.35 on ArabicMMLU (3-shot), and 68.64 on OALL-v2 (0-shot) for Arabic knowledge; 40.00 on Nahw-MCQ (3-shot), 60.60 on AraLingBench (0-shot), 65.0 on Phonology (0-shot), 63.9 on Morphology (0-shot), 66.3 on Almieyar Syntax (0-shot), 74.7 on Semantics (0-shot), and 78.7 on Pragmatics (0-shot) for Arabic language; 83.26 on Belebele (3-shot) and roughly 59–63 on several AraDiCE and DialectalArabic-MMLU variants for dialectal evaluation; 79.66 on ACVA (5-shot), 82.33 on PalmX Islamic (0-shot), and 67.10 on PalmX Culture (0-shot) for Arabic and Islamic culture awareness; and 71.32 on MMLU (5-shot), 82.37 on PIQA (0-shot), 83.01 on HellaSwag (0-shot), and 65.19 on ARC Challenge (0-shot) for English world knowledge. Its conversational and instruction-following profile in the same paper includes MT-Bench: 5.58, IFEval: 74.70, Arabic Cultural: 3.86, and Internal: 9.14 (Team et al., 17 Mar 2026).

The Fanar platform report presents closely related results for Fanar Prime and Fanar Prime Instruct and emphasizes gains over Gemma-2-9B and Gemma-2-9b-it on Arabic-focused benchmarks. For the base model, the paper reports 57.30 on MMMLU(Ar), 67.35 on ArabicMMLU, 3-shot, 54.79 on OALL, 71.90 on CulturalMCQ, 79.37 on Belebele(Ar), and 77.68 on Almieyar(Ar), all exceeding the corresponding Gemma-2-9b scores listed in the paper. For Fanar Prime Instruct, the report gives 67.82 on ArabicMMLU, 3-shot, 63.81 on OALL, 70.60 on CulturalMCQ, 82.48 on Belebele(Ar), 78.30 on Almieyar(Ar), and 9.66 on User-Chats, again above the listed Gemma-2-9b-it baselines on those tasks (Team et al., 18 Jan 2025).

The Fanar 2.0 paper reframes these numbers comparatively rather than absolutely. It states that Fanar-27B consistently outperforms the 9B first-generation model, with summary gains of +9.1 on MMMLU/Ar, +7.3 on ArabicMMLU, +7.6 on MMLU, and +3.5 on Belebele. This does not negate Fanar-1-9B’s earlier standing; rather, it places the model as a solid first-generation baseline that remained competitive across Arabic, dialectal, cultural, and bilingual evaluations while being clearly surpassed by the later 27B system (Team et al., 17 Mar 2026).

A common misunderstanding is to treat these results as evidence that all “Fanar” capabilities were already present in the 9B checkpoint alone. The platform literature indicates otherwise: some of the strongest end-user behaviors attributed to Fanar were produced through orchestration, retrieval, or auxiliary services rather than through the base 9B model in isolation. Similarly, the benchmark tables describe a strong general-purpose model for its size, not a universally dominant model across all judged generation settings (Team et al., 18 Jan 2025, Team et al., 17 Mar 2026).

6. Specialized adaptation for Islamic inheritance reasoning

The most detailed downstream case study of Fanar-1-9B is the QIAS 2025 shared-task system for Islamic Inheritance Reasoning (Ilm al-Mawārīth). In that paper, Fanar-1-9B is the central model and is explicitly described as the base model for the submission, a “9-billion parameter causal decoder-only transformer” “specifically designed for Arabic and Islamic domain text.” The system fine-tunes the model with Low-Rank Adaptation (LoRA) and then uses the adapted checkpoint as the generator inside a Retrieval-Augmented Generation (RAG) pipeline. The authors release the resulting checkpoint as msmadi/Fanar-1-9B-Islamic-Inheritance-Reasoning, based on QCRI/Fanar-1-9B (AL-Smadi, 20 Aug 2025).

The task itself is a multiple-choice classification problem over 22,000 examples: 20,000 train, 1,000 validation, and 1,000 test. Each example is an Islamic inheritance MCQ with question text and up to six options (A–F), evenly split between Beginner and Advanced difficulty. The described reasoning demands include understanding inheritance scenarios stated in natural language, identifying eligible and ineligible heirs, applying fixed-share rules, managing residuary shares, handling proportional reduction (‘awl\text{‘awl}) and redistribution (radd), and performing precise share calculations. The model is not trained to emit long explanations; instead, examples are serialized as system–user–assistant turns, with the assistant target restricted to a single gold letter A–F (AL-Smadi, 20 Aug 2025).

The LoRA setup is parameter-efficient but concretely specified. LoRA is described conceptually as injecting “trainable rank-decomposition matrices into specific layers while keeping the original weights frozen.” The reported adapter targets are q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, and down_proj, with rank r=32r = 32, LoRA alpha 1×1061 \times 10^{-6}0, and LoRA dropout 1×1061 \times 10^{-6}1. The fine-tuning hyperparameters are 4 epochs, per-device batch size 2 for train and eval, 32 gradient accumulation steps, learning rate 1×1061 \times 10^{-6}2, weight decay 0.01, warmup ratio 0.1, max gradient norm 1.0, optimizer adamw_torch, cosine decay scheduler, and FP16 precision. Memory-efficiency measures include 4-bit NormalFloat (NF4) quantization, gradient checkpointing, attention implementation set to eager, and disabling use_cache when gradient checkpointing is enabled. The paper is equally explicit about what it does not specify: no formal LoRA equation, no causal-LM objective formula, no exact trainable-parameter count after LoRA, no exact sequence length used during fine-tuning, and no hardware inventory (AL-Smadi, 20 Aug 2025).

At inference time, the fine-tuned model is embedded in a practical RAG system. Questions are embedded with sentence-transformers/all-MiniLM-L6-v2, searched in a FAISS index, and augmented with the top-1×1061 \times 10^{-6}3 retrieved passages where 1×1061 \times 10^{-6}4. Those passages are concatenated with the question and answer options into an “enriched Arabic chat prompt” for Fanar-1-9B. The reported decoding settings are a maximum input length of 10,000 tokens, maximum new tokens 15, temperature 0.05, and greedy decoding aimed at short, deterministic outputs, followed by regex-based answer extraction to force a single valid letter prediction (AL-Smadi, 20 Aug 2025).

The reported performance is 85.8% overall accuracy on the final test set, with 74.0% on Beginner and 97.6% on Advanced questions. The paper compares this full QU-NLP system—LoRA-fine-tuned Fanar-1-9B plus RAG—against zero-shot baselines from the organizers: o3 at 93.4 overall, 94.4 beginner, 92.4 advanced; Gemini 2.5 at 90.6, 91.6, 89.6; GPT-4.5 at 74.0, 86.8, 61.2; LLaMA3 at 48.8, 57.8, 39.8; Fanar 7B at 48.1, 60.4, 35.8; Mistral at 44.5, 58.6, 30.4; and ALLaM7B at 42.9, 58.0, 27.8. The paper explicitly states that QU-NLP “surpassed all models on the advanced subset” with 97.6% accuracy on 500 advanced MCQs, exceeding both Gemini 2.5 and OpenAI o3 on that subset (AL-Smadi, 20 Aug 2025).

That result requires careful interpretation. The paper does not show that the raw, untuned Fanar-1-9B base model surpasses frontier models zero-shot. Rather, it shows that fine-tuned Fanar-1-9B within a retrieval-grounded pipeline can outperform several zero-shot baselines, particularly on advanced Islamic inheritance MCQs. The same paper also does not provide a clean ablation isolating base zero-shot Fanar-1-9B, LoRA without RAG, or RAG without fine-tuning; therefore, the numeric contribution of retrieval is argued qualitatively rather than established by an explicit ablation table (AL-Smadi, 20 Aug 2025).

The error analysis reveals where the adapted 9B model remained brittle. Accuracy on blocked-heir questions is 64.5% for 1×1061 \times 10^{-6}5, versus 94.9% for 1×1061 \times 10^{-6}6 non-blocked cases, and the authors relate part of this to distribution shift: blocked items form 17/1000 = 1.70% of development, 3491/20000 = 17.46% of training, and 299/1000 = 29.90% of test. Questions containing negation or exception markers such as 1×1061 \times 10^{-6}7 yield 83.5% accuracy for 1×1061 \times 10^{-6}8, versus 95.3% for 1×1061 \times 10^{-6}9 questions without negation. The authors also identify 10 near-duplicate answer-option cases—about 7% of all errors—as orthographic evaluation artifacts rather than clear model failures. The full misclassification breakdown is 106 blocked-heir errors, 17 negation-exception errors, 10 near-duplicate-option errors, 9 other errors, and 142 total errors (AL-Smadi, 20 Aug 2025).

Taken together, this downstream study portrays Fanar-1-9B as a model whose strongest specialized behavior emerges when four conditions align: Arabic input, close match to its domain specialization, supervised adaptation on a substantial task dataset, and a constrained output space reinforced by retrieval grounding and post-processing. A plausible implication is that the model’s value lies less in frontier-scale open-ended generation than in highly structured Arabic reasoning settings where domain adaptation, retrieval, and controlled decoding can compensate for moderate model scale (AL-Smadi, 20 Aug 2025).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Fanar-1-9B.