Downloads · 30 days
15
22% of all-time downloads
mohammed-orabi2/qwen-poetry-arabic-lora
qwen-poetry-arabic-lora is a machine learning model from mohammed-orabi2. 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 peft.
Model ID: mohammed-orabi2/qwen-poetry-lora2
Downloads · 30 days
15
22% of all-time downloads
All-time downloads
67
Public
Repo size
50.2 MB
Likes
2
Public
Click a slice to open those files.
.json42.7 MB · 46%
From the Hugging Face model README
Model ID: mohammed-orabi2/qwen-poetry-lora2
Model Description:
This is a LoRA fine-tuned version of the Qwen/Qwen3-1.7B model, specifically trained to generate Arabic poetic responses in a conversational format. It was trained on a dataset of 1,000 synthetic Arabic poetry dialogues, each containing a user query and a poetic response.
Developed by: Mohammed Orabi
Shared by : mohammed-orabi2
Model type: Causal Language Model with LoRA adaptation
Language(s) (NLP): Arabic
License: Apache 2.0 (inherits from Qwen3-1.7B)
Finetuned from model : Qwen/Qwen3-1.7B
**Model Sources ** Repository: https://huggingface.co/mohammed-orabi2/qwen-poetry-lora2
Direct Use: This model can be used for generating Arabic poetry in response to user queries, particularly in cultural, educational, or creative chatbot applications.
Downstream Use :
Out-of-Scope Use:
The model was fine-tuned on synthetic poetic data and may:
Users should avoid relying on this model for objective or critical outputs.
Users (both direct and downstream) should be aware of the creative, poetic intent of this model. For factual content, use general-purpose LLMs. Evaluate outputs manually before publishing or broadcasting.
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-1.7B", device_map="auto", torch_dtype=torch.float16)
model = PeftModel.from_pretrained(base_model, "mohammed-orabi2/qwen-poetry-arabic-lora")
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3-1.7B")
prompt = "اكتب لي بيت شعر عن النجاح."
chat = [{"role": "user", "content": prompt}]
formatted_prompt = tokenizer.apply_chat_template(chat, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(formatted_prompt, return_tensors="pt").to(model.device)
output = model.generate(**inputs, max_new_tokens=100)
print(tokenizer.decode(output[0], skip_special_tokens=True))
Training Data: 1,000 synthetic Arabic poetic dialogues (prompt + poetic response) generated programmatically.
Preprocessing :
Training Hyperparameters:
Speeds, Sizes, Times :
Testing Data: 50 reserved samples from the poetic dataset
Factors:
Metrics:
Results:
Model Examination [optional]: Output behavior consistent with training intent. Performs well within poetic use-case boundaries.
Hardware Type: NVIDIA L4 Hours used: ~0.4 hours (24 minutes) Cloud Provider: Google Colab Compute Region: US (GCP default) Carbon Emitted: Estimated ~0.2 kg CO2e
Model Architecture and Objective: Transformer decoder (CausalLM) + LoRA injection
Compute Infrastructure: Google Colab
Hardware: NVIDIA L4 (24 mins)
Software:
BibTeX:
@misc{qwenpoetry2025,
author = {Mohammed Orabi},
title = {Qwen Arabic Poetry LoRA},
year = {2025},
howpublished = {\url{https://huggingface.co/mohammed-orabi2/qwen-poetry-lora2}}
}
APA: Mohammed Orabi. (2025). Qwen Arabic Poetry LoRA [Model]. Hugging Face. https://huggingface.co/mohammed-orabi2/qwen-poetry-lora2
For support or feedback, please open an issue on the Hugging Face repo or contact via Hugging Face profile.
Mohammed Orabi
https://huggingface.co/mohammed-orabi2