Downloads · 30 days
11
16% of all-time downloads
Omartificial-Intelligence-Space
Omartificial-Intelligence-Space/AraStyleTransfer-21
AraStyleTransfer-21 is a machine learning model from Omartificial-Intelligence-Space. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
🏆 First Place Winner at AraGenEval 2025 Competition
Downloads · 30 days
11
16% of all-time downloads
All-time downloads
69
Public
Parameters
367M
1.5 GB on disk
Likes
3
Public
Click a slice to open those files.
.safetensors1.5 GB · 99%
From the Hugging Face model README
🏆 First Place Winner at AraGenEval 2025 Competition
A state-of-the-art Arabic text style transfer model that transforms text into the writing style of 21 different Arabic authors using descriptive author tokens and prompt engineering.
📘 ANLPers at AraGenEval Shared Task: Descriptive Author Tokens for Transparent Arabic Authorship Style Transfer [https://aclanthology.org/2025.arabicnlp-sharedtasks.8.pdf]
"اكتب النص التالي بأسلوب <author:name>: [text]"The model incorporates comprehensive stylometric analysis including:
"اكتب النص التالي بأسلوب <author:يوسف_إدريس>: [original_text]"<author:يوسف_إدريس>For batch processing, your input file should have the following format:
| id | text_in_msa (partial) | text_in_author_style (partial) |
|---|---|---|
| 3835 | "لم أقم مطلقًا بالاحتفال بعيد ميلادي... وكنت أتجادل مع كامل الشناوي..." | "عمري ما احتفلت بعيد ميلادي... وأتشاجر مع كامل الشناوي على ذلك الاكتئاب..." |
| 3836 | "الزمن العام هو العداد الجماعي الذي يسجل السنين... ويبرز الزمن الخاص..." | "الزمن العام يعدّ السنين للناس كلها... أما عدادك الخاص فأنت نادرًا ما تنظر فيه..." |
| 3837 | "مصر الغنية الراقية... اشتراكية وديمقراطية تتفاعل معًا... أحلام الخمسين..." | "مصر المصنِّعة... الكون مائة زهرة... وحين أبلغ الخمسين أبدأ أعيش وأتعلم الموسيقى..." |
| 3838 | "غرابة التجربة... طفولة جادة تمامًا بلا مرح... الطفولة كانت عيبًا..." | "غريبة هي الأفكار... كنتُ رجلًا رهيبًا في ثوب طفل... والطفولة تُهمة نخشى الاعتراف بها..." |
| 3839 | "هذا ليس ندمًا... موجة تفوقك قوة... النصر الحقيقي أن تعيش كما تختار..." | "ليس مرارة ولا ندمًا... أنت تناضل موجة أعتى منك... والحق أن تحيا كما اخترت أنت..." |
Official results on the AraGenEval 2025 testset. Our prompt engineering system ranked first.
<p align="left"> <img src="https://cdn-uploads.huggingface.co/production/uploads/628f7a71dd993507cfcbe587/pCfAK4zefvXZ4YI1AvXIG.png" width="400"/> </p>from transformers import T5Tokenizer, T5ForConditionalGeneration
import torch
# Load model
model_name = "Omartificial-Intelligence-Space/AraStyleTransfer-21"
tokenizer = T5Tokenizer.from_pretrained(model_name)
model = T5ForConditionalGeneration.from_pretrained(model_name)
device = "cuda" if torch.cuda.is_available() else "cpu"
model.to(device)
# Input text and author
text = "لم أقم مطلقًا بالاحتفال بعيد ميلادي منذ طفولتي."
author = "يوسف إدريس"
# Prompt format
prompt = f"اكتب النص التالي بأسلوب <author:{author.replace(' ', '_')}>: {text}"
# Tokenize
inputs = tokenizer(prompt, return_tensors="pt").to(device)
# Generate
output_ids = model.generate(
**inputs,
max_length=256,
num_beams=5,
early_stopping=True
)
# Decode
generated_text = tokenizer.decode(output_ids[0], skip_special_tokens=True)
print("Original:", text)
print("Author:", author)
print("Output:", generated_text)
This model was developed for the AraGenEval 2025 competition. For questions or contributions, please refer to the competition guidelines.
This model is released under the same license as the base AraT5v2 model.
@inproceedings{nacar2025anlpers,
title={ANLPers at AraGenEval Shared Task: Descriptive Author Tokens for Transparent Arabic Authorship Style Transfer},
author={Nacar, Omer and Reda, Mahmoud and Sibaee, Serry and Alhabashi, Yasser and Ammar, Adel and Boulila, Wadii},
booktitle={Proceedings of The Third Arabic Natural Language Processing Conference: Shared Tasks},
pages={49--53},
year={2025}
}
🏆 First Place Winner at AraGenEval 2025 - Arabic Text Style Transfer Competition