Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,148 @@
|
|
1 |
-
---
|
2 |
-
license: mit
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
language:
|
4 |
+
- en
|
5 |
+
- hi
|
6 |
+
- el
|
7 |
+
metrics:
|
8 |
+
- bleu
|
9 |
+
base_model:
|
10 |
+
- facebook/m2m100_418M
|
11 |
+
---
|
12 |
+
# Model Card for Multilingual Translation Model
|
13 |
+
|
14 |
+
## Model Details
|
15 |
+
|
16 |
+
### Model Description
|
17 |
+
|
18 |
+
This model is a fine-tuned version of `facebook/m2m100_418M` for multilingual translation tasks. It supports English (`en`), Hindi (`hi`), and Greek (`el`) as source and target languages. The model has been specifically optimized to ensure accurate and fluent translations across these languages.
|
19 |
+
|
20 |
+
- **Developed by:** Arun Kumar Roy
|
21 |
+
- **Model type:** Transformer-based sequence-to-sequence model for machine translation
|
22 |
+
- **Language(s) (NLP):** English, Hindi, Greek
|
23 |
+
- **License:** MIT
|
24 |
+
- **Finetuned from model:** `facebook/m2m100_418M`
|
25 |
+
|
26 |
+
### Model Sources
|
27 |
+
|
28 |
+
- **Repository:** [Link to model repository]
|
29 |
+
- **Demo [optional]:** [Provide a link if applicable]
|
30 |
+
|
31 |
+
## Uses
|
32 |
+
|
33 |
+
### Direct Use
|
34 |
+
|
35 |
+
This model can be directly used for multilingual machine translation tasks in English, Hindi, and Greek. Use cases include:
|
36 |
+
|
37 |
+
- Document translation
|
38 |
+
- Real-time conversational translation
|
39 |
+
- Educational tools for language learning
|
40 |
+
|
41 |
+
### Downstream Use [optional]
|
42 |
+
|
43 |
+
The model can be further fine-tuned for domain-specific translation tasks such as medical, legal, or technical documents.
|
44 |
+
|
45 |
+
### Out-of-Scope Use
|
46 |
+
|
47 |
+
The model may not perform well for:
|
48 |
+
- Languages other than English, Hindi, and Greek.
|
49 |
+
- Highly informal, dialectical, or domain-specific text without additional fine-tuning.
|
50 |
+
- Use cases requiring strict grammatical correctness for complex legal or academic content.
|
51 |
+
|
52 |
+
## Bias, Risks, and Limitations
|
53 |
+
|
54 |
+
This model inherits potential biases from its training data, which may include:
|
55 |
+
- Gender bias in language representation.
|
56 |
+
- Cultural or contextual inaccuracies when translating idiomatic expressions.
|
57 |
+
|
58 |
+
### Recommendations
|
59 |
+
|
60 |
+
Users should:
|
61 |
+
- Review translations for critical applications.
|
62 |
+
- Be cautious when using the model for sensitive or culturally nuanced content.
|
63 |
+
|
64 |
+
## How to Get Started with the Model
|
65 |
+
|
66 |
+
Use the code below to get started with the model:
|
67 |
+
|
68 |
+
```python
|
69 |
+
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
70 |
+
|
71 |
+
tokenizer = AutoTokenizer.from_pretrained("path_to_your_model")
|
72 |
+
model = AutoModelForSeq2SeqLM.from_pretrained("path_to_your_model")
|
73 |
+
|
74 |
+
inputs = tokenizer("Translate this text", return_tensors="pt")
|
75 |
+
outputs = model.generate(**inputs)
|
76 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
77 |
+
```
|
78 |
+
|
79 |
+
## Training Details
|
80 |
+
|
81 |
+
### Training Data
|
82 |
+
|
83 |
+
The model was fine-tuned on a dataset comprising multilingual text pairs for English, Hindi, and Greek. The dataset includes:
|
84 |
+
- Publicly available bilingual corpora.
|
85 |
+
- Synthetic data for low-resource language pairs.
|
86 |
+
|
87 |
+
### Training Procedure
|
88 |
+
|
89 |
+
#### Preprocessing
|
90 |
+
|
91 |
+
- Tokenization with `facebook/m2m100_418M` tokenizer.
|
92 |
+
- Dynamic padding with sequences padded to the longest in the batch.
|
93 |
+
|
94 |
+
#### Training Hyperparameters
|
95 |
+
|
96 |
+
- **Training regime:** Mixed precision (fp32)
|
97 |
+
- **Batch size:** 16
|
98 |
+
- **Learning rate:** 2e-5
|
99 |
+
- **Number of epochs:** 10
|
100 |
+
|
101 |
+
#### Speeds, Sizes, Times [optional]
|
102 |
+
|
103 |
+
- Approximate training time: 1218 minutes on M3 Pro chip.
|
104 |
+
|
105 |
+
## Evaluation
|
106 |
+
|
107 |
+
|
108 |
+
#### Testing Data
|
109 |
+
|
110 |
+
The model was evaluated using a held-out test set from the same multilingual dataset used for fine-tuning.
|
111 |
+
|
112 |
+
#### Metrics
|
113 |
+
|
114 |
+
The primary evaluation metric is BLEU score.
|
115 |
+
|
116 |
+
### Results
|
117 |
+
|
118 |
+
The model achieved the following BLEU scores:
|
119 |
+
- English to Hindi: 36.2
|
120 |
+
- English to Greek: 31.5
|
121 |
+
|
122 |
+
## Environmental Impact
|
123 |
+
|
124 |
+
- **Hardware Type:** M3 Pro Chip (MacBook)
|
125 |
+
- **Hours used:** ~1218 Min
|
126 |
+
- **Compute Region:** Local
|
127 |
+
- **Carbon Emitted:** Negligible (powered by renewable energy sources, where applicable)
|
128 |
+
|
129 |
+
## Citation [optional]
|
130 |
+
|
131 |
+
**BibTeX:**
|
132 |
+
```bibtex
|
133 |
+
@misc{arun_translation_model,
|
134 |
+
author = {Arun Kumar Roy},
|
135 |
+
title = {Multilingual Translation Model for English, Hindi, and Greek},
|
136 |
+
year = {2025},
|
137 |
+
publisher = {Hugging Face}
|
138 |
+
}
|
139 |
+
```
|
140 |
+
|
141 |
+
## Model Card Authors
|
142 |
+
|
143 |
+
- Arun Kumar Roy
|
144 |
+
|
145 |
+
## Model Card Contact
|
146 |
+
|
147 |
+
For inquiries, contact [https://github.com/aktheroy].
|
148 |
+
|