Downloads · 30 days
25
22% of all-time downloads
samielakkad1/jakma-darija-A-adapter
jakma-darija-A-adapter is a text generation model from samielakkad1. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
LoRA adapter for Qwen2.5-1.5B-Instruct fine-tuned on Moroccan Darija conversational data, used by the jak.ma Moroccan home-services platform.
Downloads · 30 days
25
22% of all-time downloads
All-time downloads
112
Public
Repo size
1.9 GB
Likes
1
Public
Click a slice to open those files.
.safetensors1.9 GB · 99%
From the Hugging Face model README
LoRA adapter for Qwen2.5-1.5B-Instruct fine-tuned on Moroccan Darija conversational data, used by the jak.ma Moroccan home-services platform.
Generates short, helpful replies in Moroccan Darija (Arabic script) for everyday home-services questions — plumber prices in Tangier, finding a painter in Casablanca, washing-machine repair quotes, etc. Built as a commercial-safe (Track A) variant that excludes CC-BY-NC-ND data.
import torch
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained('Qwen/Qwen2.5-1.5B-Instruct')
base = AutoModelForCausalLM.from_pretrained(
'Qwen/Qwen2.5-1.5B-Instruct',
torch_dtype=torch.bfloat16,
device_map='cuda',
)
model = PeftModel.from_pretrained(base, 'Samielakkad1/jakma-darija-A-adapter')
msg = [{'role':'user','content':'شحال كيسوا تركيب صنبور؟'}]
prompt = tok.apply_chat_template(msg, tokenize=False, add_generation_prompt=True)
out = model.generate(**tok(prompt, return_tensors='pt').to('cuda'), max_new_tokens=200)
print(tok.decode(out[0], skip_special_tokens=True))
| Setting | Value |
|---|---|
| Base model | Qwen/Qwen2.5-1.5B-Instruct |
| Method | LoRA via PEFT 0.13.2 / TRL SFTTrainer |
| LoRA rank | 16 |
| LoRA alpha | 32 |
| LoRA dropout | 0.05 |
| Target modules | q_proj, k_proj, v_proj, o_proj, up_proj, gate_proj, down_proj |
| Epochs | 2 |
| Learning rate | 2e-4 |
| Batch size | 1 (grad accumulation 16) |
| Max sequence length | 1024 |
| Optimizations | NEFTune α=5.0, SFT sequence packing |
| Hardware | 1× NVIDIA RTX A5000 (24 GB) on RunPod |
| Total wall time | ~80 minutes |
| Final train loss | 0.5612 |
| Source | Records | License |
|---|---|---|
| DODa (Darija Open Dataset) | 48,035 | research-personal |
| DODa parallel pairs | 18,410 | research-personal |
| jak.ma hand-crafted exemplars | 210 (10× upsampled from 21) | internal / hand-crafted |
| Track A train total | 53,325 | commercial-safe subset |
Validation: 6,665. Test: 6,665. Quality filter dropped 537. Deduplication dropped 755. Upsampling weights bias toward hand-crafted in-domain examples.
peft.PeftModel.from_pretrained — the loader handles vocab alignment.Sami El Akkad (@Samielakkad1) — MSc, Tsinghua SIGS — building jak.ma.
Training code: https://github.com/Samielakkad/jakma