Downloads · 30 days
40
8% of all-time downloads
malhajar/Shahin-v0.1
Shahin-v0.1 is a text generation model from malhajar. Use it when you need the model to write or continue text. It is set up for transformers.
<div style="text-align: right; direction: rtl;" <img src="https://huggingface.co/malhajar/Shahin-v0.1/resolve/90e48b33b4b9f095665a9cc3e822283f2134568c/d125b8078db86fa7a2c3dc1d7cc3a125835680ec1d23fe94e6866083.jpg" alt=…
Downloads · 30 days
40
8% of all-time downloads
All-time downloads
533
Public
Parameters
14.8B
59.1 GB on disk
Likes
6
Public
Click a slice to open those files.
.safetensors59.1 GB · 100%
From the Hugging Face model README
شاهين 0.1 هو نموذج لغة ضخم (LLM) مصمم خصيصًا للهجة السورية، تكريمًا لصمود وروح الشعب السوري. هذا النموذج يمثل منارة للحرية والتقدم، وتم تطويره تكريمًا لانتصارهم بعد 70 عامًا من الدكتاتورية. يتميز بطلاقة فائقة في اللهجة السورية ويبرع في مجموعة واسعة من المهام، من إنشاء الحوارات إلى تقديم رؤى ثقافية وتحليل تاريخي والمزيد.
Shahin-v0.1 is a large language model (LLM) created specifically for the Syrian Arabic dialect, designed as a tribute to the resilience and spirit of the Syrian people. This model is a beacon of freedom and progress, developed in honor of their victory against 70 years of dictatorship. It offers unparalleled fluency in Syrian Arabic and excels in a wide range of tasks, from dialogue generation to cultural insights, history, and more.
from transformers import AutoModelForCausalLM, AutoTokenizer
device = "cuda"
model_name = "malhajar/Shahin-v0.1"
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(model_name)
prompt = "شو الأسباب يلي خلت الثورة السورية تستمر رغم كل الظروف؟"
messages = [
{
"role": "system",
"content": "أنت مساعد افتراضي سوري، جاهز للإجابة على الأسئلة بكل وضوح وصدق."
},
{
"role": "user",
"content": prompt
}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to(device)
generated_ids = model.generate(
model_inputs.input_ids,
temperature=0.7,
top_k=40,
top_p=0.85,
max_new_tokens=256,
repetition_penalty=1.1,
)
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
print(response)
Prompt:
شو الأسباب يلي خلت الثورة السورية تستمر رغم كل الظروف؟
Response:
الثورة السورية استمرت بفضل إصرار الشعب السوري على الحرية والكرامة. الشعب ما تخلى عن مطالبه رغم القمع العنيف والظروف الصعبة، وكان في دعم كبير من المغتربين السوريين . الإرادة الحقيقية لتغيير الواقع المظلم كانت أقوى من أي تحدي.
Prompt:
احكيلي عن تاريخ قلعة حلب.
Response:
قلعة حلب هي واحدة من أهم المعالم التاريخية بسوريا، عمرها يرجع لأكثر من 4,000 سنة. كانت مركزاً للدفاع عن المدينة ومرت عليها حضارات عديدة مثل الحثيين، الرومان، والأيوبيين. اليوم، هي رمز للصمود السوري ومرآة لتاريخ الشعب العريق.
Shahin-v0.1 showcases the beauty and strength of Syrian Arabic and stands as a technological milestone for the Syrian people.