Model reference · open weights
SILMA is an open-weight language model from silma-ai. SILMA-9B-Instruct-v1.0 (BF16) weighs 18.5 GB; the smallest configuration that runs it is 2× RTX 3060 12 GB.
For self-hosting, compare this build's requirements below with the GPU you plan to rent.
Summary of the silma-ai/SILMA-9B-Instruct-v1.0 model card, 2026-10-01
What it is
| Released by | silma-ai |
|---|---|
| Released | 2024-08-17 |
| Parameters | 9.2B |
| VRAM | 18.5 GB for the weights |
What it runs on
| Card | Requests at once | Context max | Memory |
|---|---|---|---|
| 8K each | |||
| RTX 3060 12 GB … RTX 4060 Ti 16 GB 2 smaller cards | |||
| RTX 3090 24 GB | 1 | all 8K | 23.4 GB |
| RTX 4090 24 GB | 1 | all 8K | 23.4 GB |
| RTX 5090 32 GB | 4 | all 8K | 31.0 GB |
| L40S 48 GB | 8 | all 8K | 44.0 GB |
| A100 80 GB | 20 | all 8K | 78.2 GB |
| H100 80 GB | 18 | all 8K | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | 24 | all 8K | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | 29 | all 8K | 107 GB |
| H200 141 GB | 40 | all 8K | 138 GB |
| B200 180 GB | 53 | all 8K | 176 GB |
| 2× RTX 3060 12 GB tensor parallel | 1 | all 8K | 11.6 GB a card |
| 2× RTX 4060 Ti 16 GB tensor parallel | 3 | all 8K | 15.4 GB a card |
| 2× RTX 4090 24 GB tensor parallel | 9 | all 8K | 23.4 GB a card |
| 2× RTX 3090 24 GB tensor parallel | 9 | all 8K | 23.4 GB a card |
| 2× RTX 5090 32 GB tensor parallel | 14 | all 8K | 31.0 GB a card |
| Requests at once | 8K tokens each |
|---|---|
| 1 | 22.2 GB |
| 5 | 33.4 GB |
| 8 | 41.9 GB |
| 16 | 64.4 GB |
| 32 | 110 GB |
| 64 | 200 GB |
One card, with vLLM's small-card settings.
From the model card
SILMA.AI is a leading Generative AI startup dedicated to empowering Arabic speakers with state-of-the-art AI solutions.
Important Tip: 💡 For RAG use-cases please use SILMA Kashif v1.0 as it has been specifically trained for Question Answering tasks.
We are a team of seasoned Arabic AI experts who understand the nuances of the language and cultural considerations, enabling us to build solutions that truly resonate with Arabic users.
Authors: silma.ai
Below we share some code snippets on how to get quickly started with running the model. First, install the Transformers library with:
pip install -U transformers sentencepiece
Then, copy the snippet from the section that is relevant for your usecase.
pipeline APIimport torch
from transformers import pipeline
pipe = pipeline(
"text-generation",
model="silma-ai/SILMA-9B-Instruct-v1.0",
model_kwargs={"torch_dtype": torch.bfloat16},
device="cuda", # replace with "mps" to run on a Mac device
)
messages = [
{"role": "user", "content": "اكتب رسالة تعتذر فيها لمديري في العمل عن الحضور اليوم لأسباب مرضية."},
]
outputs = pipe(messages, max_new_tokens=256)
assistant_response = outputs[0]["generated_text"][-1]["content"].strip()
print(assistant_response)
السلام عليكم ورحمة الله وبركاته
أودّ أن أعتذر عن عدم الحضور إلى العمل اليوم بسبب مرضي. أشعر بالسوء الشديد وأحتاج إلى الراحة. سأعود إلى العمل فور تعافيي.
شكراً لتفهمكم.
مع تحياتي،
[اسمك]
pip install accelerate
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_id = "silma-ai/SILMA-9B-Instruct-v1.0"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
device_map="auto",
torch_dtype=torch.bfloat16,
)
messages = [
{"role": "system", "content": "أنت مساعد ذكي للإجابة عن أسئلة المستخدمين."},
{"role": "user", "content": "أيهما أبعد عن الأرض, الشمس أم القمر؟"},
]
input_ids = tokenizer.apply_chat_template(messages, return_tensors="pt", return_dict=True).to("cuda")
outputs = model.generate(**input_ids, max_new_tokens=256)
print(tokenizer.decode(outputs[0]))
الشمس
You can ensure the correct chat template is applied by using tokenizer.apply_chat_template as follows:
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_id = "silma-ai/SILMA-9B-Instruct-v1.0"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
device_map="auto",
torch_dtype=torch.bfloat16,
)
messages = [
{"role": "system", "content": "أنت مساعد ذكي للإجابة عن أسئلة المستخدمين."},
{"role": "user", "content": "اكتب كود بايثون لتوليد متسلسلة أرقام زوجية."},
]
input_ids = tokenizer.apply_chat_template(messages, return_tensors="pt", return_dict=True).to("cuda")
outputs = model.generate(**input_ids, max_new_tokens=256)
print(tokenizer.decode(outputs[0]).split("model")[-1])
def generate_even_numbers(n):
"""
This function generates a list of even numbers from 1 to n.
Args:
n: The upper limit of the range.
Returns:
A list of even numbers.
"""
return [i for i in range(1, n + 1) if i % 2 == 0]
# Example usage
n = 10
even_numbers = generate_even_numbers(n)
print(f"The first {n} even numbers are: {even_numbers}")
bitsandbytesUsing 8-bit precision (int8)
pip install bitsandbytes accelerate
# pip install bitsandbytes accelerate
from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
model_id = "silma-ai/SILMA-9B-Instruct-v1.0"
quantization_config = BitsAndBytesConfig(load_in_8bit=True)
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
quantization_config=quantization_config,
)
messages = [
{"role": "system", "content": "أنت مساعد ذكي للإجابة عن أسئلة المستخدمين."},
{"role": "user", "content": "اذكر خمس انواع فواكه بها نسب عالية من فيتامين ج."},
]
input_ids = tokenizer.apply_chat_template(messages, return_tensors="pt", return_dict=True).to("cuda")
outputs = model.generate(**input_ids, max_new_tokens=256)
print(tokenizer.decode(outputs[0]).split("model")[-1])
الليمون، البرتقال، الموز، الكيوي، الفراولة
Using 4-bit precision
# pip install bitsandbytes accelerate
from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
model_id = "silma-ai/SILMA-9B-Instruct-v1.0"
quantization_config = BitsAndBytesConfig(load_in_4bit=True)
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
quantization_config=quantization_config,
)
messages = [
{"role": "system", "content": "أنت مساعد ذكي للإجابة عن أسئلة المستخدمين."},
{"role": "user", "content": "في أي عام توفى صلاح الدين الأيوبي؟"},
]
input_ids = tokenizer.apply_chat_template(messages, return_tensors="pt", return_dict=True).to("cuda")
outputs = model.generate(**input_ids, max_new_tokens=256)
print(tokenizer.decode(outputs[0]).splQuoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.
Benchmarks
As published on the model card: the maker's own numbers, not measured by AxForge.
| Task | Dataset | Metric | Score |
|---|---|---|---|
| text-generation | Arabic Broad Benchmark (ABB) | benchmark_score | 6.150 |
| text-generation | MMLU (Arabic) | acc_norm | 52.550 |
| text-generation | AlGhafa | acc_norm | 71.850 |
| text-generation | ARC Challenge (Arabic) | acc_norm | 78.190 |
| text-generation | ACVA | acc_norm | 78.890 |
| text-generation | Arabic_EXAMS | acc_norm | 51.400 |
| text-generation | ARC Easy | acc_norm | 86 |
| text-generation | BOOLQ (Arabic) | acc_norm | 64.050 |
| text-generation | COPA (Arabic) | acc_norm | 78.890 |
| text-generation | HELLASWAG (Arabic) | acc_norm | 47.640 |
| text-generation | OPENBOOK QA (Arabic) | acc_norm | 72.930 |
| text-generation | PIQA (Arabic) | acc_norm | 71.960 |
| text-generation | RACE (Arabic) | acc_norm | 75.550 |
| text-generation | SCIQ (Arabic) | acc_norm | 91.260 |
| text-generation | TOXIGEN (Arabic) | acc_norm | 67.590 |
| Text Generation | IFEval (0-Shot) | strict accuracy | 58.420 |
| Text Generation | BBH (3-Shot) | normalized accuracy | 30.710 |
| Text Generation | MATH Lvl 5 (4-Shot) | exact match | 0 |
| Text Generation | GPQA (0-shot) | acc_norm | 7.380 |
| Text Generation | MuSR (0-shot) | acc_norm | 17.260 |
| Text Generation | MMLU-PRO (5-shot) | accuracy | 32.440 |