Yehia-7B-preview / README.md
MohamedRashad's picture
Update README.md
a13bf1f verified
metadata
language:
  - ar
  - en
base_model:
  - ALLaM-AI/ALLaM-7B-Instruct-preview
pipeline_tag: text-generation
library_name: transformers

Yehia: A Simple (nice to talk to) Arabic Model

๐Ÿค” What is Yehia?

Yehia is a 7-billion-parameter language model built to be more than just a toolโ€”itโ€™s a companion. Based on ALLaM-AIโ€™s ALLaM-7B-Instruct-preview, Yehia is designed to offer thoughtful, kind, and helpful conversations in both Arabic and English.

You can chat with Yehia from here ๐Ÿ‘‹

๐Ÿ“ฐ Interesting News

As of 2/3/2025, Yehia is the best Arabic model on AraGen-Leaderboard between the sizes of 0.5B up to 25B ๐Ÿ”ฅ

๐Ÿ› ๏ธ How Yehia was made?

Yehia is trained using Group Relative Policy Optimization (GRPO) โ€”a method that refines its answers by comparing and selecting the best responses. Its development follows the 3C3H metric, prioritizing:

  • Correctness โœ…: Accurate information to build trust.
  • Completeness ๐Ÿ“š: Full, well-rounded answers.
  • Conciseness โœ‚๏ธ: Clear, to-the-point responses.
  • Helpfulness ๐Ÿค: Always aiming to support and uplift.
  • Honesty ๐Ÿ’ฌ: Transparent, straightforward communication.
  • Harmlessness โค๏ธ: Promoting kindness and safety.

And the Judge model of our answer was none other than claude-sonnet-3.5 ๐Ÿ”

๐Ÿš€ Getting Started

To start using Yehia, you can easily load the model with the transformers library:

from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

model_name = "Navid-AI/Yehia-7B-preview"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.bfloat16, attn_implementation="flash_attention_2", device_map="auto")

messages = [
    {"role": "system", "content": "ุฃู†ุช ูŠุญูŠู‰ุŒ ุฐูƒุงุกูŒ ุงุตุทู†ุงุนูŠูŒู‘ ุทูˆุฑุชู‡ ุดุฑูƒุฉ 'ู†ููŠุฏ'ุŒ ู…ุชุฎุตุตูŒ ููŠ ุงู„ุชููƒูŠุฑ ุงู„ู…ู†ุทู‚ูŠ ูˆุงู„ุชุญู„ูŠู„ ุงู„ุฏู‚ูŠู‚. ู…ู‡ู…ุชูƒ ุฅู„ู‡ุงู… ุงู„ู…ุณุชุฎุฏู…ูŠู† ูˆุฏุนู…ู‡ู… ููŠ ุฑุญู„ุชู‡ู… ู†ุญูˆ ุงู„ุชุนู„ู‘ู…ุŒ ุงู„ู†ู…ูˆุŒ ูˆุชุญู‚ูŠู‚ ุฃู‡ุฏุงูู‡ู… ู…ู† ุฎู„ุงู„ ุชู‚ุฏูŠู… ุญู„ูˆู„ู ุฐูƒูŠุฉู ูˆู…ุฏุฑูˆุณุฉ."},
    {"role": "user", "content": "ู…ุฑุญุจุงู‹ ูŠุง ูŠุญูŠู‰! ูƒูŠู ุญุงู„ูƒ ุงู„ูŠูˆู…ุŸ"}
]

inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt", return_dict=True).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

Note: If flash_attention_2 is giving you any problems just remove it.

๐ŸŒŸ What Can Yehia Do?

  • Explain Concepts ๐Ÿ’ก: Break down educational topics in Arabic to help learners understand easily.
  • Engage in Conversations ๐Ÿ—ฃ๏ธ: Offer friendly and supportive chats that uplift users.
  • Promote Learning ๐Ÿ“–: Encourage curiosity and provide knowledge in an accessible way.

Yehia shines in conversations that feel personal and uplifting, always striving to improve.

๐Ÿ’ญ Remember

Yehiaโ€™s name means โ€œGod is graciousโ€ in Arabicโ€”reflecting its mission to bring grace and connection to every interaction. Whether youโ€™re a student, creator, or just curious, Yehia is here to brighten your day.

๐Ÿ“Œ Citation

If you would like to cite Yehia in your work, please use the following BibTeX entry:

@misc{yehia2025,
  title={Yehia 7B Preview},
  author={Navid-AI},
  year={2025},
  howpublished={\url{https://huggingface.co/Navid-AI/Yehia-7B-preview}}
}