This model is a fine-tuned version of the NLLB-200-600M model, specifically adapted for translating from English to Egyptian Arabic. Fine-tuned on a custom dataset of 12,000 samples, it aims to provide high-quality translations that capture the nuances and colloquial expressions of Egyptian Arabic.
The dataset used for fine-tuning was collected from high-quality transcriptions of videos, ensuring the language data is rich and contextually accurate.
1from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
2
3model_name = "Mhassanen/nllb-200-600M-En-Ar"
4tokenizer = AutoTokenizer.from_pretrained(model_name, src_lang="eng_Latn", tgt_lang="arz_Arab")
5model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
6
7def translate(text):
8 inputs = tokenizer(text, return_tensors="pt", padding=True)
9 translated_tokens = model.generate(**inputs)
10 translated_text = tokenizer.batch_decode(translated_tokens, skip_special_tokens=True)
11 return translated_text
12
13text = "Hello, how are you?"
14print(translate(text))
The model has been evaluated on a validation set to ensure translation quality. While it excels at capturing colloquial Egyptian Arabic, ongoing improvements and additional data can further enhance its performance.
This model builds upon the
NLLB-200-600M developed by Facebook AI, fine-tuned to cater specifically to the Egyptian Arabic dialect.