Downloads · 30 days
8
23% of all-time downloads
mohammed-el-baraka/KhulasaAI
KhulasaAI is a text generation model from mohammed-el-baraka. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as mit.
A LoRA adapter for Qwen2.5-0.5B-Instruct fine-tuned on Arabic text summarization via Knowledge Distillation from Qwen2.5-7B-Instruct.
Downloads · 30 days
8
23% of all-time downloads
All-time downloads
35
Public
Repo size
8.7 MB
Likes
0
Public
Click a slice to open those files.
.safetensors8.7 MB · 100%
From the Hugging Face model README
A LoRA adapter for Qwen2.5-0.5B-Instruct fine-tuned on Arabic text summarization via Knowledge Distillation from Qwen2.5-7B-Instruct.
| Property | Value |
|---|---|
| Base Model | Qwen/Qwen2.5-0.5B-Instruct (494M parameters) |
| Teacher Model | Qwen/Qwen2.5-7B-Instruct |
| Method | QLoRA (r=16, α=32, dropout=0.05) |
| Target Modules | q_proj, k_proj, v_proj, o_proj |
| Language | Arabic (Modern Standard Arabic) |
| Task | Abstractive Text Summarization |
| Adapter Size | 8.3 MB |
| License | MIT |
wikimedia/wikipedia, 20231101.ar)| Metric | Score |
|---|---|
| ROUGE-1 | 62.21 |
| ROUGE-2 | 41.17 |
| ROUGE-L | 60.66 |
| BERTScore (F1) | 0.861 |
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
import torch
# Load model
base_model_id = "Qwen/Qwen2.5-0.5B-Instruct"
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
model = AutoModelForCausalLM.from_pretrained(base_model_id, torch_dtype=torch.float16, device_map="auto")
model = PeftModel.from_pretrained(model, "mohammed-el-baraka/KhulasaAI")
# Summarize
text = "your Arabic text here..."
messages = [
{"role": "system", "content": "لخص النص التالي."},
{"role": "user", "content": f"النص: {text}\n\nالملخص:"}
]
inputs = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt")
with torch.no_grad():
outputs = model.generate(inputs.to(model.device), max_new_tokens=150, temperature=0.7, do_sample=True)
summary = tokenizer.decode(outputs[0], skip_special_tokens=True).split("assistant")[-1].strip()
print(summary)
max_new_tokens constraint during annotation.@misc{elbaraka2026khulasaai,
title={KhulasaAI: Arabic Text Summarization via Knowledge Distillation},
author={Mohammed El Baraka},
year={2026},
month={january},
howpublished={\url{https://github.com/mohammed-el-baraka/KhulasaAI}}
}
Mohammed El Baraka — University Mohammed VI Polytechnic (UM6P)