Update README.md
Browse files
README.md
CHANGED
@@ -30,46 +30,94 @@ model-index:
|
|
30 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
31 |
should probably proofread and complete it, then remove this comment. -->
|
32 |
|
33 |
-
#
|
34 |
|
35 |
-
This model is a fine-tuned version of [Helsinki-NLP/opus-mt-en-fr](https://huggingface.co/Helsinki-NLP/opus-mt-en-fr)
|
36 |
-
|
37 |
-
-
|
38 |
-
- Bleu: 50.5445
|
39 |
|
40 |
-
|
|
|
|
|
41 |
|
42 |
-
|
43 |
|
44 |
-
|
45 |
|
46 |
-
|
47 |
|
48 |
-
|
|
|
|
|
49 |
|
50 |
-
|
|
|
|
|
51 |
|
52 |
-
|
53 |
|
54 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
|
56 |
-
|
57 |
-
- learning_rate: 2e-05
|
58 |
-
- train_batch_size: 32
|
59 |
-
- eval_batch_size: 64
|
60 |
-
- seed: 42
|
61 |
-
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
62 |
-
- lr_scheduler_type: linear
|
63 |
-
- num_epochs: 1
|
64 |
-
- mixed_precision_training: Native AMP
|
65 |
|
66 |
-
|
|
|
67 |
|
|
|
|
|
|
|
68 |
|
|
|
|
|
|
|
|
|
69 |
|
70 |
-
|
71 |
|
72 |
-
|
73 |
-
- Pytorch 2.5.1+cu121
|
74 |
-
- Datasets 3.2.0
|
75 |
-
- Tokenizers 0.21.0
|
|
|
30 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
31 |
should probably proofread and complete it, then remove this comment. -->
|
32 |
|
33 |
+
# Marian Fine-Tuned KDE4 (English-to-French)
|
34 |
|
35 |
+
This model is a fine-tuned version of [Helsinki-NLP/opus-mt-en-fr](https://huggingface.co/Helsinki-NLP/opus-mt-en-fr) using the KDE4 dataset. It achieves the following results on the evaluation set:
|
36 |
+
- **Loss**: 0.9620
|
37 |
+
- **BLEU**: 50.5445
|
|
|
38 |
|
39 |
+
---
|
40 |
+
|
41 |
+
## Model Description
|
42 |
|
43 |
+
This English-to-French translation model has been fine-tuned specifically on the KDE4 dataset. The base model, Helsinki-NLP/opus-mt-en-fr, is part of the MarianMT family, renowned for its efficiency and high-quality neural machine translation capabilities.
|
44 |
|
45 |
+
---
|
46 |
|
47 |
+
## Intended Uses & Limitations
|
48 |
|
49 |
+
### Intended Uses
|
50 |
+
- Translating English text into French.
|
51 |
+
- High-quality translations in the context of software localization, especially related to KDE4.
|
52 |
|
53 |
+
### Limitations
|
54 |
+
- Performance may decline on texts outside the KDE4 domain.
|
55 |
+
- Struggles with idiomatic expressions, specialized technical jargon, or ambiguous content.
|
56 |
|
57 |
+
---
|
58 |
|
59 |
+
## Training & Evaluation Data
|
60 |
+
|
61 |
+
The model was fine-tuned on the KDE4 dataset, a specialized resource for machine translation in software localization. The evaluation metrics reflect the model's performance on this domain-specific data.
|
62 |
+
|
63 |
+
---
|
64 |
+
|
65 |
+
## Training Procedure
|
66 |
+
|
67 |
+
### Hyperparameters
|
68 |
+
- **Learning Rate**: 2e-05
|
69 |
+
- **Train Batch Size**: 32
|
70 |
+
- **Eval Batch Size**: 64
|
71 |
+
- **Seed**: 42
|
72 |
+
- **Optimizer**: AdamW with `betas=(0.9, 0.999)`, `epsilon=1e-08`
|
73 |
+
- **LR Scheduler**: Linear
|
74 |
+
- **Epochs**: 1
|
75 |
+
- **Mixed Precision Training**: Native AMP
|
76 |
+
|
77 |
+
### Results
|
78 |
+
- **Loss**: 0.9620
|
79 |
+
- **BLEU**: 50.5445
|
80 |
+
|
81 |
+
### Training Loss Progression
|
82 |
+
|
83 |
+
| Step | Training Loss |
|
84 |
+
|-------|---------------|
|
85 |
+
| 500 | 1.2253 |
|
86 |
+
| 1000 | 1.2165 |
|
87 |
+
| 1500 | 1.1913 |
|
88 |
+
| 2000 | 1.1404 |
|
89 |
+
| 2500 | 1.1178 |
|
90 |
+
| 3000 | 1.0900 |
|
91 |
+
| 3500 | 1.0594 |
|
92 |
+
| 4000 | 1.0512 |
|
93 |
+
| 4500 | 1.0633 |
|
94 |
+
| 5000 | 1.0405 |
|
95 |
+
| 5500 | 1.0316 |
|
96 |
+
|
97 |
+
---
|
98 |
+
|
99 |
+
## Framework Versions
|
100 |
+
- **Transformers**: 4.47.1
|
101 |
+
- **PyTorch**: 2.5.1+cu121
|
102 |
+
- **Datasets**: 3.2.0
|
103 |
+
- **Tokenizers**: 0.21.0
|
104 |
+
|
105 |
+
---
|
106 |
|
107 |
+
## Example Usage
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
|
109 |
+
```python
|
110 |
+
from transformers import pipeline
|
111 |
|
112 |
+
# Load the model
|
113 |
+
model_checkpoint = "ParitKansal/marian-finetuned-kde4-en-to-fr"
|
114 |
+
translator = pipeline("translation", model=model_checkpoint)
|
115 |
|
116 |
+
# Translate text
|
117 |
+
translation = translator("Default to expanded threads")
|
118 |
+
print(translation)
|
119 |
+
```
|
120 |
|
121 |
+
This script demonstrates how to use the model for English-to-French translation tasks.
|
122 |
|
123 |
+
---
|
|
|
|
|
|