Upload README.md with huggingface_hub
Browse files
README.md
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Marian Fine-tuned English-French Translation Model
|
2 |
+
|
3 |
+
## Model Description
|
4 |
+
|
5 |
+
This model is a fine-tuned version of `Helsinki-NLP/opus-mt-en-fr`, specifically trained for English to French translation. The base model was further trained on the `KDE4` dataset to improve translation quality for technical and software-related content.
|
6 |
+
|
7 |
+
## Model Training Details
|
8 |
+
|
9 |
+
### Training Dataset
|
10 |
+
- **Dataset**: KDE4 Dataset (English-French parallel corpus)
|
11 |
+
- **Split Distribution**:
|
12 |
+
- Training set: 189,155 examples (90%)
|
13 |
+
- Test set: 21,018 examples (10%)
|
14 |
+
|
15 |
+
### Training Configuration
|
16 |
+
- **Base Model**: Helsinki-NLP/opus-mt-en-fr
|
17 |
+
- **Training Arguments**:
|
18 |
+
- Learning rate: 2e-5
|
19 |
+
- Batch size: 32 (training), 64 (evaluation)
|
20 |
+
- Number of epochs: 10
|
21 |
+
- Weight decay: 0.01
|
22 |
+
- FP16 training enabled
|
23 |
+
- Evaluation strategy: Before and after training
|
24 |
+
- Checkpoint saving: Every epoch (maximum 3 saved)
|
25 |
+
- Training device: GPU with mixed precision (fp16)
|
26 |
+
|
27 |
+
## Model Results
|
28 |
+
|
29 |
+
### Evaluation Metrics
|
30 |
+
|
31 |
+
The model was evaluated using the BLEU score. The evaluation results before and after training are summarized in the table below:
|
32 |
+
|
33 |
+
| **Stage** | **Eval Loss** | **BLEU Score** |
|
34 |
+
|--------------------|---------------|----------------|
|
35 |
+
| **Before Training** | 1.700 | 38.97 |
|
36 |
+
| **After Training** | 0.796 | 54.96 |
|
37 |
+
|
38 |
+
|
39 |
+
### Training Loss
|
40 |
+
|
41 |
+
The training loss decreased over the epochs, indicating that the model was learning effectively. The final training loss was approximately 0.710.
|
42 |
+
|
43 |
+
|
44 |
+
## Model Usage
|
45 |
+
|
46 |
+
|
47 |
+
```python
|
48 |
+
from transformers import pipeline
|
49 |
+
|
50 |
+
model_checkpoint = "Prikshit7766/marian-finetuned-kde4-en-to-fr"
|
51 |
+
translator = pipeline("translation", model=model_checkpoint)
|
52 |
+
translator("Default to expanded threads")
|
53 |
+
```
|
54 |
+
|
55 |
+
### Example Output
|
56 |
+
|
57 |
+
```plaintext
|
58 |
+
[{'translation_text': 'Par défaut, développer les fils de discussion'}]
|
59 |
+
```
|