Gemma-4-E4B-Arabic-Max-It
noman-asif/Gemma-4-E4B-Arabic-Max-It is the high-Arabic specialization variant (4.5B total / 4.0B active dense parameters) adapted from google/gemma-4-E4B-it, maximizing performance on Arabic grammar & linguistics (MadinahQA), multi-discipline Arabic knowledge (ArabicMMLU), safety (AraTrust), and Arabic legal/medical reasoning (MMMLU-Ar).
Developed by Noman Asif | Code & Pipeline: nnoman-asif/Gemma-4-Arabic
Gemma-4-Arabic Model Family
| Model | Architecture | Total / Active Params | Precision | Recommended Use Case |
|---|---|---|---|---|
noman-asif/Gemma-4-E4B-Arabic-It | Dense | 4.5B / 4.0B | bfloat16 | Balanced bilingual Arabic & general reasoning on single-GPU / workstation hardware |
noman-asif/Gemma-4-E4B-Arabic-Max-It | Dense | 4.5B / 4.0B | bfloat16 | Maximum Arabic grammar, cultural & legal/medical specialization on compact hardware |
noman-asif/Gemma-4-26B-A4B-Arabic-It | Sparse MoE (128 Experts) | 25.2B / 3.8B | bfloat16 | Balanced bilingual Arabic + peak STEM, competition math & code reasoning |
noman-asif/Gemma-4-26B-A4B-Arabic-Max-It | Sparse MoE (128 Experts) | 25.2B / 3.8B | bfloat16 | Maximum Arabic language, grammar & legal/medical accuracy with full math/code capability |
Training Datasets:
- Stage 1 SFT (
30,000rows):noman-asif/Arabic-Reasoning-Instruct-30k - Stage 2 DPO (
6,000pairs):noman-asif/Arabic-Preference-DPO-6k
Benchmark Evaluation
1. Arabic Language, Culture & Domain Reasoning (7 Official Suites)
| Benchmark | Metric | Mode | Gemma-4-E4B-it | Gemma-4-E4B-Arabic-It | Gemma-4-E4B-Arabic-Max-It | Gemma-4-26B-A4B-it | Gemma-4-26B-A4B-Arabic-It | Gemma-4-26B-A4B-Arabic-Max-It |
|---|---|---|---|---|---|---|---|---|
| ArabicMMLU (40 subjects) | acc_norm | 0-shot | 66.87 | 67.51 | 68.96 | 76.51 | 76.81 | 77.05 |
| MadinahQA (Language & Grammar) | acc_norm | 0-shot | 64.96 | 66.94 | 73.82 | 65.98 | 68.20 | 81.95 |
| AlGhafa (MSA, Dialects & QA) | acc_norm | 0-shot | 74.38 | 74.44 | 74.68 | 76.92 | 77.41 | 77.12 |
| ACVA (Arab & Saudi Culture) | acc_norm | 5-shot | 81.86 | 82.12 | 81.76 | 81.82 | 81.81 | 82.04 |
| EXAMS-AR | acc_norm | 0-shot | 55.68 | 56.05 | 55.87 | 59.96 | 59.96 | 59.78 |
| AraTrust (Safety & Ethics) | acc_norm | 0-shot | 87.11 | 87.74 | 88.62 | 91.65 | 91.69 | 89.90 |
| MMMLU-Ar (Law, Medicine & Accounting) | accuracy | 0-shot (Thinking) | 74.20 | 73.95 | 74.84 | 90.04 | 90.29 | 90.42 |
2. General Reasoning, Science, Math & Code (Official Gemma 4 Suites — Thinking Mode)
| Benchmark | Metric | Mode | Gemma-4-E4B-it | Gemma-4-E4B-Arabic-It | Gemma-4-E4B-Arabic-Max-It | Gemma-4-26B-A4B-it | Gemma-4-26B-A4B-Arabic-It | Gemma-4-26B-A4B-Arabic-Max-It |
|---|---|---|---|---|---|---|---|---|
| MMLU-Pro | exact_match | 5-shot (Thinking) | 69.54 | 69.77 | 68.13 | 79.44 | 78.96 | 78.02 |
| GPQA-Diamond | accuracy | 0-shot (Thinking) | 60.61 | 57.07 | 59.09 | 79.29 | 83.33 | 83.33 |
| AIME-2026 | avg@4 | 0-shot (Thinking) | 58.33 | 49.17 | 43.33 | 89.17 | 91.67 | 89.17 |
| LiveCodeBench-v6 | pass@1 | 0-shot (Thinking) | 53.14 | 52.00 | 52.00 | 73.14 | 73.14 | 73.14 |
Production vLLM Multi-User Serving (1 to 50 Concurrent Users on 1x NVIDIA A100 80GB)
Measured with vLLM (tensor_parallel_size=1, bfloat16, 512 Arabic prompt tokens -> 256 generated tokens per user, uncached prefill) on a single NVIDIA A100 80GB PCIe GPU:
| Concurrent Users | Model Architecture | Median TTFT | Per-User Speed | Total System Throughput | Active VRAM / 80 GB |
|---|---|---|---|---|---|
| 1 User | E4B (4.0B Active Dense) | 30.5 ms | 111.6 tok/s | 111.6 tok/s | 16.1 GB (20.3%) |
| 1 User | 26B-A4B (3.8B Active MoE) | 48.4 ms | 131.0 tok/s | 131.0 tok/s | 49.9 GB (63.0%) |
| 10 Users | E4B (4.0B Active Dense) | 232.8 ms | 102.0 tok/s | 1,020.5 tok/s | 16.8 GB (21.2%) |
| 10 Users | 26B-A4B (3.8B Active MoE) | 258.6 ms | 70.0 tok/s | 699.5 tok/s | 51.5 GB (65.0%) |
| 30 Users | E4B (4.0B Active Dense) | 655.7 ms | 92.6 tok/s | 2,778.1 tok/s | 18.4 GB (23.3%) |
| 30 Users | 26B-A4B (3.8B Active MoE) | 688.6 ms | 53.3 tok/s | 1,600.1 tok/s | 55.1 GB (69.5%) |
| 40 Users | E4B (4.0B Active Dense) | 866.0 ms | 87.4 tok/s | 3,496.1 tok/s | 19.2 GB (24.3%) |
| 40 Users | 26B-A4B (3.8B Active MoE) | 909.1 ms | 59.3 tok/s | 2,372.3 tok/s | 56.9 GB (71.8%) |
| 50 Users | E4B (4.0B Active Dense) | 1078.1 ms | 81.5 tok/s | 4,075.8 tok/s | 20.0 GB (25.3%) |
| 50 Users | 26B-A4B (3.8B Active MoE) | 1135.9 ms | 43.3 tok/s | 2,164.8 tok/s | 58.7 GB (74.0%) |
Quickstart Usage
1. Hugging Face transformers (Thinking Mode & Direct Mode)
import torch
from transformers import AutoModelForImageTextToText, AutoTokenizer
model_id = "noman-asif/Gemma-4-E4B-Arabic-Max-It"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForImageTextToText.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
)
messages = [
{"role": "user", "content": "اشرح أهم حقوق العامل عند انتهاء عقد العمل وفق نظام العمل السعودي."}
]
# Set enable_thinking=True for step-by-step reasoning (<|channel>thought...<channel|>), or False for direct replies
prompt = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
enable_thinking=True,
)
inputs = tokenizer(prompt, return_tensors="pt", add_special_tokens=False).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=2048, temperature=1.0, top_p=0.95, top_k=64)
print(tokenizer.decode(outputs[0][inputs['input_ids'].shape[-1]:], skip_special_tokens=True))
2. Production vLLM OpenAI-Compatible Server
vllm serve noman-asif/Gemma-4-E4B-Arabic-Max-It \
--dtype bfloat16 \
--max-model-len 16384 \
--reasoning-parser gemma4
Training & Architecture Specifications
| Specification | E4B Models | 26B-A4B Models |
|---|---|---|
| Base Model | google/gemma-4-E4B-it | google/gemma-4-26B-A4B-it |
| Architecture | Dense Transformer (4.5B total / 4.0B active) | Sparse MoE (25.2B total / 3.8B active, 128 routed + 1 shared expert) |
| Supervised Fine-Tuning | 30k MSA, Saudi dialect, legal, medical & bilingual reasoning curriculum | 30k MSA, Saudi dialect, legal, medical & bilingual reasoning curriculum (attention + 128 experts) |
| Preference Alignment | Direct Preference Optimization (DPO) on 6k length-balanced conversational & CoT pairs | Direct Preference Optimization (DPO) on 6k length-balanced conversational & CoT pairs |
| Checkpoint Format | Standalone 16-bit (bfloat16) Safetensors (TIES-Merged) | Standalone 16-bit (bfloat16) Safetensors (TIES-Merged) |
Intended Use & Limitations
- Intended Use: Arabic & bilingual conversational assistants, Saudi dialect understanding, Arabic legal/regulatory & medical document reasoning, educational tutoring, and high-throughput enterprise serving via vLLM.
- Limitations: As with all language models, outputs may occasionally contain factual inaccuracies. Legal and medical responses are intended for research and informational assistance rather than certified professional advice.
Citation
@misc{asif2026gemma4arabic,
title = {Gemma-4-Arabic: Bilingual & Saudi-Aligned Dense and Sparse MoE Language Models},
author = {Noman Asif},
year = {2026},
url = {https://huggingface.co/noman-asif/Gemma-4-E4B-Arabic-Max-It}
}
License
Released under the Apache License 2.0 (apache-2.0).