Downloads · 30 days
48
53% of all-time downloads
Abdelkareem/supra-50m-arabic-sft-mix
supra-50m-arabic-sft-mix is a text generation model from Abdelkareem. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
Instruction-tuned (SFT) version of a from-scratch 50M-parameter Arabic language model. The base is a Llama-style decoder (hidden 512 / 12 layers / 8 heads, 4 KV / ctx 1024) pretrained on Arabic Wikipedia + FineWeb-2 A…
Downloads · 30 days
48
53% of all-time downloads
All-time downloads
90
Public
Parameters
51.8M
414 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors207 MB · 99%
From the Hugging Face model README
Instruction-tuned (SFT) version of a from-scratch 50M-parameter Arabic language model. The base is a Llama-style decoder (hidden 512 / 12 layers / 8 heads, 4 KV / ctx 1024) pretrained on Arabic Wikipedia + FineWeb-2 Arabic with a custom 32k Arabic BPE tokenizer. This checkpoint adds a ChatML chat format and instruction-following behaviour.
⚠️ Arabic-only. The model has never seen English (or other languages) in pretraining or SFT. Do not expect translation to/from English or non-Arabic output.
Datasets are mixed and shuffled (not trained sequentially, to avoid catastrophic
forgetting). All of each dataset is used; the small native high-quality set (CIDAR)
is upsampled so it isn't drowned out. The Cap column shows any row limit (- = full).
| Dataset | Examples used | Cap | Upsample |
|---|---|---|---|
2A2I/Arabic-OpenHermes-2.5 | 981,618 | - | 1 |
ClusterlabAi/InstAr-500k | 481,281 | - | 1 |
arbml/CIDAR | 80,000 | - | 8 |
Split: 1,527,470 train / 15,429 eval.
ChatML, with loss on assistant turns only (assistant_only_loss):
<|im_start|>user
ما هي عاصمة مصر؟<|im_end|>
<|im_start|>assistant
القاهرة.<|im_end|>
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("Abdelkareem/supra-50m-arabic-sft-mix")
model = AutoModelForCausalLM.from_pretrained("Abdelkareem/supra-50m-arabic-sft-mix")
messages = [{"role": "user", "content": "اشرح ما هو الذكاء الاصطناعي بكلمات بسيطة."}]
enc = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt", return_dict=True)
out = model.generate(**enc, max_new_tokens=200, do_sample=True, temperature=0.7, top_p=0.9, repetition_penalty=1.2)
print(tok.decode(out[0, enc["input_ids"].shape[1]:], skip_special_tokens=True))
SFTTrainerResearch / educational demo of a tiny Arabic instruction model. At 50M parameters it learns chat format and simple tasks (short answers, summaries, rewrites) but:
Dataset licenses are those of the source datasets; review them before redistribution.