Translation
Transformers
Safetensors
English
Arabic
marian
text2text-generation
NLP
Egyptian Arabic
English-Arabic
Instructions to use Omar-youssef/english-egyptian-arabic-translator with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Omar-youssef/english-egyptian-arabic-translator 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="Omar-youssef/english-egyptian-arabic-translator")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("Omar-youssef/english-egyptian-arabic-translator") model = AutoModelForSeq2SeqLM.from_pretrained("Omar-youssef/english-egyptian-arabic-translator", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,13 +1,28 @@
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
-
tags:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
---
|
| 5 |
|
| 6 |
-
#
|
| 7 |
|
| 8 |
<!-- Provide a quick summary of what the model is/does. -->
|
| 9 |
|
| 10 |
-
|
| 11 |
|
| 12 |
## Model Details
|
| 13 |
|
|
@@ -15,23 +30,12 @@ tags: []
|
|
| 15 |
|
| 16 |
<!-- Provide a longer summary of what this model is. -->
|
| 17 |
|
| 18 |
-
This is
|
| 19 |
-
|
| 20 |
-
- **Developed by:** [More Information Needed]
|
| 21 |
-
- **Funded by [optional]:** [More Information Needed]
|
| 22 |
-
- **Shared by [optional]:** [More Information Needed]
|
| 23 |
-
- **Model type:** [More Information Needed]
|
| 24 |
-
- **Language(s) (NLP):** [More Information Needed]
|
| 25 |
-
- **License:** [More Information Needed]
|
| 26 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
| 27 |
-
|
| 28 |
-
### Model Sources [optional]
|
| 29 |
-
|
| 30 |
-
<!-- Provide the basic links for the model. -->
|
| 31 |
|
| 32 |
-
- **
|
| 33 |
-
- **
|
| 34 |
-
- **
|
|
|
|
| 35 |
|
| 36 |
## Uses
|
| 37 |
|
|
@@ -39,66 +43,57 @@ This is the model card of a 🤗 transformers model that has been pushed on the
|
|
| 39 |
|
| 40 |
### Direct Use
|
| 41 |
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
[More Information Needed]
|
| 51 |
|
| 52 |
### Out-of-Scope Use
|
| 53 |
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
## Bias, Risks, and Limitations
|
| 59 |
|
| 60 |
-
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
| 61 |
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
### Recommendations
|
| 65 |
-
|
| 66 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
| 67 |
|
| 68 |
-
|
| 69 |
|
| 70 |
-
|
|
|
|
| 71 |
|
| 72 |
-
|
|
|
|
|
|
|
| 73 |
|
| 74 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
|
| 76 |
## Training Details
|
| 77 |
|
| 78 |
### Training Data
|
| 79 |
|
| 80 |
-
|
| 81 |
|
| 82 |
-
[More Information Needed]
|
| 83 |
|
| 84 |
### Training Procedure
|
| 85 |
|
| 86 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
| 87 |
-
|
| 88 |
-
#### Preprocessing [optional]
|
| 89 |
-
|
| 90 |
-
[More Information Needed]
|
| 91 |
-
|
| 92 |
|
| 93 |
#### Training Hyperparameters
|
| 94 |
|
| 95 |
-
- **Training regime:**
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
[More Information Needed]
|
| 102 |
|
| 103 |
## Evaluation
|
| 104 |
|
|
@@ -106,94 +101,44 @@ Use the code below to get started with the model.
|
|
| 106 |
|
| 107 |
### Testing Data, Factors & Metrics
|
| 108 |
|
| 109 |
-
#### Testing Data
|
| 110 |
-
|
| 111 |
-
<!-- This should link to a Dataset Card if possible. -->
|
| 112 |
-
|
| 113 |
-
[More Information Needed]
|
| 114 |
-
|
| 115 |
-
#### Factors
|
| 116 |
-
|
| 117 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
| 118 |
-
|
| 119 |
-
[More Information Needed]
|
| 120 |
-
|
| 121 |
#### Metrics
|
| 122 |
|
| 123 |
-
|
| 124 |
|
| 125 |
-
[More Information Needed]
|
| 126 |
|
| 127 |
-
##
|
| 128 |
|
| 129 |
-
|
| 130 |
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
## Model Examination [optional]
|
| 136 |
-
|
| 137 |
-
<!-- Relevant interpretability work for the model goes here -->
|
| 138 |
-
|
| 139 |
-
[More Information Needed]
|
| 140 |
-
|
| 141 |
-
## Environmental Impact
|
| 142 |
-
|
| 143 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
| 144 |
-
|
| 145 |
-
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
| 146 |
-
|
| 147 |
-
- **Hardware Type:** [More Information Needed]
|
| 148 |
-
- **Hours used:** [More Information Needed]
|
| 149 |
-
- **Cloud Provider:** [More Information Needed]
|
| 150 |
-
- **Compute Region:** [More Information Needed]
|
| 151 |
-
- **Carbon Emitted:** [More Information Needed]
|
| 152 |
-
|
| 153 |
-
## Technical Specifications [optional]
|
| 154 |
-
|
| 155 |
-
### Model Architecture and Objective
|
| 156 |
-
|
| 157 |
-
[More Information Needed]
|
| 158 |
|
| 159 |
### Compute Infrastructure
|
| 160 |
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
#### Software
|
| 168 |
-
|
| 169 |
-
[More Information Needed]
|
| 170 |
-
|
| 171 |
-
## Citation [optional]
|
| 172 |
-
|
| 173 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
| 174 |
-
|
| 175 |
-
**BibTeX:**
|
| 176 |
-
|
| 177 |
-
[More Information Needed]
|
| 178 |
-
|
| 179 |
-
**APA:**
|
| 180 |
-
|
| 181 |
-
[More Information Needed]
|
| 182 |
-
|
| 183 |
-
## Glossary [optional]
|
| 184 |
-
|
| 185 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
| 186 |
-
|
| 187 |
-
[More Information Needed]
|
| 188 |
|
| 189 |
-
##
|
| 190 |
|
| 191 |
-
|
| 192 |
|
| 193 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 194 |
|
| 195 |
-
|
| 196 |
|
| 197 |
## Model Card Contact
|
| 198 |
|
| 199 |
-
[
|
|
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
+
tags:
|
| 4 |
+
- NLP
|
| 5 |
+
- translation
|
| 6 |
+
- Egyptian Arabic
|
| 7 |
+
- English-Arabic
|
| 8 |
+
license: apache-2.0
|
| 9 |
+
datasets:
|
| 10 |
+
- Omar-youssef/English-Egyptian-Arabic-Translation
|
| 11 |
+
language:
|
| 12 |
+
- en
|
| 13 |
+
- ar
|
| 14 |
+
metrics:
|
| 15 |
+
- bleu
|
| 16 |
+
base_model:
|
| 17 |
+
- Helsinki-NLP/opus-mt-tc-big-en-ar
|
| 18 |
+
pipeline_tag: translation
|
| 19 |
---
|
| 20 |
|
| 21 |
+
# English to Egyptian Arabic Neural Machine Translation Model
|
| 22 |
|
| 23 |
<!-- Provide a quick summary of what the model is/does. -->
|
| 24 |
|
| 25 |
+
This model translates English text into colloquial Egyptian Arabic. It is fine-tuned from the Helsinki-NLP/opus-mt-tc-big-en-ar base model on a specialized dataset of English-Egyptian Arabic translation pairs, ensuring natural, idiomatic, and culturally appropriate translations reflective of everyday Egyptian speech.
|
| 26 |
|
| 27 |
## Model Details
|
| 28 |
|
|
|
|
| 30 |
|
| 31 |
<!-- Provide a longer summary of what this model is. -->
|
| 32 |
|
| 33 |
+
This is a specialized neural machine translation model that translates from English to Egyptian Arabic (Masri/Egyptian Colloquial Arabic). Unlike standard Arabic translation models that produce Modern Standard Arabic (MSA), this model is trained to generate authentic colloquial Egyptian Arabic with natural speech patterns, slang, and tone appropriate to contemporary Egyptian communication.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
+
- **Model type:** Neural Machine Translation (Seq2Seq Transformer)
|
| 36 |
+
- **Language(s) (NLP):** English (en), Egyptian Arabic (ar)
|
| 37 |
+
- **License:** Apache 2.0
|
| 38 |
+
- **Finetuned from model:** Helsinki-NLP/opus-mt-tc-big-en-ar
|
| 39 |
|
| 40 |
## Uses
|
| 41 |
|
|
|
|
| 43 |
|
| 44 |
### Direct Use
|
| 45 |
|
| 46 |
+
This model is designed for translating English content into colloquial Egyptian Arabic. Suitable applications include:
|
| 47 |
+
- Social media content localization
|
| 48 |
+
- Dialogue systems and chatbots
|
| 49 |
+
- Educational materials adaptation
|
| 50 |
+
- Content creation for Egyptian audiences
|
| 51 |
+
- Travel and hospitality applications
|
| 52 |
+
- Business communication in Egyptian contexts
|
|
|
|
|
|
|
| 53 |
|
| 54 |
### Out-of-Scope Use
|
| 55 |
|
| 56 |
+
- Formal or official document translation (prefer professional human translation or MSA models)
|
| 57 |
+
- Legal or medical documents requiring precision and formal language
|
| 58 |
+
- Highly technical or specialized terminology translation without domain-specific fine-tuning
|
|
|
|
|
|
|
| 59 |
|
|
|
|
| 60 |
|
| 61 |
+
## How to Get Started with the Model
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
|
| 63 |
+
Use the code below to get started with the model:
|
| 64 |
|
| 65 |
+
```python
|
| 66 |
+
from transformers import MarianMTModel, MarianTokenizer
|
| 67 |
|
| 68 |
+
model_name = "Omar-youssef/english-egyptian-arabic-translator"
|
| 69 |
+
tokenizer = MarianTokenizer.from_pretrained(model_name)
|
| 70 |
+
model = MarianMTModel.from_pretrained(model_name)
|
| 71 |
|
| 72 |
+
# Example usage
|
| 73 |
+
text = "Hello, how are you today?"
|
| 74 |
+
inputs = tokenizer(text, return_tensors="pt")
|
| 75 |
+
translated = model.generate(**inputs)
|
| 76 |
+
output = tokenizer.decode(translated[0], skip_special_tokens=True)
|
| 77 |
+
print(output)
|
| 78 |
+
```
|
| 79 |
|
| 80 |
## Training Details
|
| 81 |
|
| 82 |
### Training Data
|
| 83 |
|
| 84 |
+
The model is trained on the **Omar-youssef/English-Egyptian-Arabic-Translation** dataset, specifically designed for English-to-Egyptian Arabic translation. The training data includes:
|
| 85 |
|
|
|
|
| 86 |
|
| 87 |
### Training Procedure
|
| 88 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 89 |
|
| 90 |
#### Training Hyperparameters
|
| 91 |
|
| 92 |
+
- **Training regime:** (bf16)
|
| 93 |
+
- **Base Model:** Helsinki-NLP/opus-mt-tc-big-en-ar
|
| 94 |
+
- **Learning Rate:** [5e-6]
|
| 95 |
+
- **Batch Size:** [16]
|
| 96 |
+
- **Epochs:** [5]
|
|
|
|
|
|
|
| 97 |
|
| 98 |
## Evaluation
|
| 99 |
|
|
|
|
| 101 |
|
| 102 |
### Testing Data, Factors & Metrics
|
| 103 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 104 |
#### Metrics
|
| 105 |
|
| 106 |
+
- **BLEU Score:** [0.4111]
|
| 107 |
|
|
|
|
| 108 |
|
| 109 |
+
## Technical Specifications
|
| 110 |
|
| 111 |
+
### Model Architecture
|
| 112 |
|
| 113 |
+
- **Architecture:** MarianMT (Encoder-Decoder Transformer)
|
| 114 |
+
- **Base:** Helsinki-NLP/opus-mt-tc-big-en-ar
|
| 115 |
+
- **Parameters:** ~500M
|
| 116 |
+
- **Task:** Sequence-to-Sequence Translation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 117 |
|
| 118 |
### Compute Infrastructure
|
| 119 |
|
| 120 |
+
- **Hardware:** Kaggle GPU (T4 )
|
| 121 |
+
- **Framework:** Hugging Face Transformers
|
| 122 |
+
- **Training time:** ~60 minutes
|
| 123 |
|
| 124 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 125 |
|
| 126 |
+
## Citation
|
| 127 |
|
| 128 |
+
If you use this model, please cite the base model and dataset:
|
| 129 |
|
| 130 |
+
```bibtex
|
| 131 |
+
@misc{omar-youssef-egyptian-translator,
|
| 132 |
+
author = {Omar Youssef},
|
| 133 |
+
title = {English to Egyptian Arabic Translation Model},
|
| 134 |
+
year = {2026},
|
| 135 |
+
publisher = {Hugging Face},
|
| 136 |
+
url = {https://huggingface.co/Omar-youssef/english-egyptian-arabic-translator}
|
| 137 |
+
}
|
| 138 |
+
```
|
| 139 |
|
| 140 |
+
---
|
| 141 |
|
| 142 |
## Model Card Contact
|
| 143 |
|
| 144 |
+
For questions or feedback, open a discussion on this model's [Hugging Face page](https://huggingface.co/Omar-youssef/english-egyptian-arabic-translator/discussions).
|