Translation
Transformers
Safetensors
English
Egyptian Arabic
mt5
text2text-generation
machine-translation
seq2seq
egyptian-arabic
low-resource
Eval Results (legacy)
Instructions to use abdullah-khaled/mt5-small-ea-finetuned with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use abdullah-khaled/mt5-small-ea-finetuned with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "translation" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # pip install "transformers<5.0.0" from transformers import pipeline pipe = pipeline("translation", model="abdullah-khaled/mt5-small-ea-finetuned")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("abdullah-khaled/mt5-small-ea-finetuned") model = AutoModelForSeq2SeqLM.from_pretrained("abdullah-khaled/mt5-small-ea-finetuned", device_map="auto") - Notebooks
- Google Colab
- Kaggle
mt5-small-ea-finetuned
English → Egyptian Arabic (Masri) neural machine translation
Fine-tuned google/mt5-small on a curated English–Egyptian Arabic parallel corpus.
Model Summary
| Base model | google/mt5-small (~300M parameters) |
| Task | Text-to-text translation (English → Egyptian Arabic) |
| Languages | en → arz (Egyptian Arabic, ISO 639-3) |
| Architecture | Encoder-decoder Transformer (T5) |
| Training objective | Supervised fine-tuning with teacher forcing |
| Max sequence length | 64 tokens (source & target) |
| Precision | bf16 / fp16 (auto-detected at training time) |
Intended Use
✅ Suitable for:
- Translating conversational English into Egyptian Arabic
- Research on low-resource dialectal Arabic MT
- Prototyping dialect-aware downstream applications (chatbots, subtitles, localization)
- Educational / exploratory NLP projects
❌ Not recommended for:
- High-stakes, legal, medical, or safety-critical translation
- Production systems without human verification
- Translating into Modern Standard Arabic (MSA) — use a dedicated MSA model
- Long-form documents (>64 tokens) — chunking required
How to Use
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
model_id = "abdullah-khaled/mt5-small-ea-finetuned"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSeq2SeqLM.from_pretrained(model_id)
PREFIX = "translate English to Egyptian Arabic: "
text = "Where are you going tonight?"
inputs = tokenizer(PREFIX + text, return_tensors="pt", max_length=64, truncation=True)
outputs = model.generate(
**inputs,
max_length=64,
num_beams=4,
early_stopping=True,
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
- Downloads last month
- 64
Model tree for abdullah-khaled/mt5-small-ea-finetuned
Base model
google/mt5-smallEvaluation results
- chrFself-reportedTBD
- BLEUself-reportedTBD