شاهين 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.
شاهين 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.