mBART-50 Fine-tuned for English-to-Vietnamese Translation
This model is a fine-tuned version of
facebook/mbart-large-50-many-to-many-mmt
for English-to-Vietnamese neural machine translation.
The model was fine-tuned exclusively on the IWSLT2015 English-Vietnamese dataset as part of a controlled comparison with NLLB-200-Distilled-600M and EnViT5-Base.
No additional parallel corpus, back-translation data, synthetic data, data augmentation, or additional corpus filtering was used.
Model Details
- Base model:
facebook/mbart-large-50-many-to-many-mmt - Model family: mBART-50
- Task: English-to-Vietnamese machine translation
- Architecture: Encoder-decoder Transformer
- Model class:
MBartForConditionalGeneration - Approximate model size: 0.6B parameters
- Source language: English
- Target language: Vietnamese
- mBART source language code:
en_XX - mBART target language code:
vi_VN - Framework: Hugging Face Transformers
- Training hardware: 1 × NVIDIA Tesla T4
- Training precision: FP16
- Training epochs: 2
- Training steps: 33,330
- Random seed: 42
- Checkpoint in this repository: Final checkpoint after 2 epochs
The upstream mBART-50 many-to-many checkpoint supports multilingual machine translation and uses language-specific tokens to control the source and target languages.
For this experiment, the model was specialized to:
English → Vietnamese
Model Sources
- Base model: https://huggingface.co/facebook/mbart-large-50-many-to-many-mmt
- mBART-50 paper: https://arxiv.org/abs/2008.00401
- Original mBART paper: https://arxiv.org/abs/2001.08210
- Fine-tuning dataset: https://huggingface.co/datasets/nguyenvuhuy/iwslt2015-en-vi
Training Data
The model was fine-tuned using:
nguyenvuhuy/iwslt2015-en-vi
Dataset splits:
| Split | Sentence pairs |
|---|---|
| Train | 133,317 |
| Validation | 1,268 |
| Test | 1,268 |
Only the IWSLT2015 English-Vietnamese dataset was used for fine-tuning.
No external parallel corpus was combined with the training data.
Preprocessing
The mBART tokenizer was configured with the following language identifiers:
Source language: en_XX
Target language: vi_VN
The tokenizer was initialized as:
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained(
"facebook/mbart-large-50-many-to-many-mmt",
src_lang="en_XX",
tgt_lang="vi_VN"
)
During generation, the Vietnamese language token was forced as the beginning-of-sequence token:
TARGET_LANG_ID = tokenizer.convert_tokens_to_ids("vi_VN")
model.generation_config.forced_bos_token_id = TARGET_LANG_ID
Maximum sequence lengths:
| Parameter | Value |
|---|---|
| Maximum source length | 128 |
| Maximum target length | 128 |
Target padding token IDs were replaced with -100 during training so that
padding positions were ignored when computing the loss.
Fixed maximum-length padding was used consistently across the controlled baseline experiments.
No additional text normalization, back-translation, synthetic data generation, or data augmentation was applied.
Training Hyperparameters
| Hyperparameter | Value |
|---|---|
| Training epochs | 2 |
| Training steps | 33,330 |
| Training batch size | 8 |
| Evaluation batch size | 8 |
| Gradient accumulation steps | 1 |
| Effective batch size | 8 |
| Learning rate | 5e-5 |
| Optimizer | AdamW |
| Weight decay | 0.01 |
| Learning-rate scheduler | Linear |
| Warmup ratio | 0.0 |
| Maximum gradient norm | 1.0 |
| Mixed precision | FP16 |
| BF16 | Disabled |
| Gradient checkpointing | Enabled |
| Random seed | 42 |
| Data seed | 42 |
| Evaluation interval | 5,000 steps |
| Maximum source length | 128 |
| Maximum target length | 128 |
| Beam size | 5 |
| Maximum generation length | 128 |
| Evaluation accumulation steps | 8 |
Validation Results
Validation performance observed during training:
| Step | Training Loss | Validation Loss | BLEU ↑ | chrF++ ↑ | TER ↓ |
|---|---|---|---|---|---|
| 5,000 | 1.2960 | 1.391973 | 32.0714 | 51.8141 | 48.3662 |
| 10,000 | 1.2468 | 1.332993 | 33.2949 | 52.1826 | 47.2523 |
| 15,000 | 1.2007 | 1.282312 | 33.6785 | 53.0478 | 46.7918 |
| 20,000 | 0.9285 | 1.305808 | 34.0614 | 53.1207 | 46.6166 |
| 25,000 | 0.9141 | 1.274503 | 34.4174 | 53.3540 | 46.2928 |
| 30,000 | 0.8929 | 1.257898 | 34.5629 | 53.8025 | 45.9630 |
Among the scheduled validation evaluations:
- Highest BLEU: 34.5629 at step 30,000
- Highest chrF++: 53.8025 at step 30,000
- Lowest TER: 45.9630 at step 30,000
- Lowest validation loss: 1.257898 at step 30,000
The overall translation quality continued to improve through the final scheduled validation measurement at step 30,000.
BLEU increased from 32.0714 at step 5,000 to 34.5629 at step 30,000.
chrF++ increased from 51.8141 to 53.8025, while TER decreased from 48.3662 to 45.9630.
Checkpoint Selection
This experiment used a fixed training budget of two epochs.
Checkpoint saving was disabled during this experimental run.
Therefore, the model stored in this repository corresponds to the final model after:
33,330 optimization steps
2 training epochs
The final scheduled validation evaluation occurred at step 30,000.
Although the strongest scheduled validation results were observed at step 30,000, the corresponding intermediate checkpoint was not retained separately.
For the controlled baseline comparison, the final two-epoch checkpoint is used consistently across:
- mBART-50
- NLLB-200-Distilled-600M
- EnViT5-Base
This ensures that all three baseline models follow the same fixed-budget checkpoint-selection protocol.
Evaluation
Evaluation Dataset
The final model is evaluated on the IWSLT2015 English-Vietnamese test split.
| Split | Samples |
|---|---|
| Test | 1,268 |
The test set is not used for model selection.
Decoding Configuration
| Parameter | Value |
|---|---|
| Decoding method | Beam search |
| Beam size | 5 |
| Maximum generation length | 128 |
| Source language | en_XX |
| Target language | vi_VN |
| Forced target language token | Enabled |
Evaluation Metrics
The following metrics are used:
- BLEU: Higher is better
- chrF++: Higher is better
- TER: Lower is better
- COMET: Higher is better
BLEU, chrF++, and TER are computed using SacreBLEU.
COMET is evaluated separately for the final baseline comparison.
Test Results
Final test-set results for the final two-epoch checkpoint:
| Metric | Score |
|---|---|
| BLEU ↑ | TBD |
| chrF++ ↑ | TBD |
| TER ↓ | TBD |
| COMET ↑ | TBD |
These values should be replaced only after evaluating the final checkpoint on the complete 1,268-sentence IWSLT2015 test set.
Validation scores reported above must not be treated as test scores.
SacreBLEU Tokenization Warning
During evaluation, SacreBLEU may produce the following warning:
It looks like you forgot to detokenize your test data.
The IWSLT2015 data representation used in this experiment contains punctuation patterns that SacreBLEU detects as potentially tokenized text.
This warning does not indicate a training failure.
For the controlled comparison, the same dataset representation and evaluation procedure are used for:
- mBART-50
- NLLB-200-Distilled-600M
- EnViT5-Base
No model-specific detokenization is applied because applying different text preprocessing to individual models would make the comparison inconsistent.
How to Use
import torch
from transformers import AutoTokenizer
from transformers import AutoModelForSeq2SeqLM
model_name = "AIOKiet/mbart-large-50-iwslt2015-en-vi"
SRC_LANG = "en_XX"
TGT_LANG = "vi_VN"
tokenizer = AutoTokenizer.from_pretrained(
model_name,
src_lang=SRC_LANG,
tgt_lang=TGT_LANG
)
model = AutoModelForSeq2SeqLM.from_pretrained(
model_name
)
device = torch.device(
"cuda" if torch.cuda.is_available() else "cpu"
)
model = model.to(device)
model.eval()
target_lang_id = tokenizer.convert_tokens_to_ids(
TGT_LANG
)
text = "Artificial intelligence is changing the world."
inputs = tokenizer(
text,
return_tensors="pt",
truncation=True,
max_length=128
).to(device)
with torch.inference_mode():
outputs = model.generate(
**inputs,
forced_bos_token_id=target_lang_id,
num_beams=5,
max_length=128
)
translation = tokenizer.batch_decode(
outputs,
skip_special_tokens=True,
clean_up_tokenization_spaces=False
)[0]
print(translation)
Example:
Input:
Artificial intelligence is changing the world.
Output:
<English-to-Vietnamese translation>
Intended Use
This fine-tuned model is intended for:
- English-to-Vietnamese machine translation research
- Evaluation on the IWSLT2015 benchmark
- Controlled neural machine translation experiments
- Comparison with NLLB-200-Distilled-600M and EnViT5-Base
- Parameter-efficient fine-tuning research
- Experimental English-to-Vietnamese translation applications
Downstream Use
The model may be used as a research component in:
- Translation demonstrations
- Experimental translation websites
- Translation APIs
- Comparative NMT studies
- Parameter-efficient fine-tuning experiments
- Machine translation research prototypes
Performance should be evaluated on the intended target domain before the model is used outside the IWSLT2015 experimental setting.
Out-of-Scope Use
The model has not been specifically validated for:
- Certified professional translation
- Medical translation
- Legal translation
- Safety-critical applications
- High-stakes translation
- Unsupervised production deployment
Additional domain-specific evaluation is required for such applications.
Limitations
Domain Limitation
The model was fine-tuned only on IWSLT2015 English-Vietnamese data.
The fine-tuning corpus is primarily associated with TED-talk-style language and may not represent other translation domains.
Performance may therefore decrease on:
- Medical text
- Legal documents
- Technical documentation
- Scientific literature
- E-commerce content
- Informal conversations
- Domain-specific terminology
Language Direction
This fine-tuning experiment specifically targets:
English → Vietnamese
Although the original mBART-50 model supports many languages, this fine-tuned checkpoint was not evaluated for other language directions.
Sequence-Length Limitation
Training and evaluation use a maximum sequence length of 128 tokens.
Long inputs may be truncated and should normally be segmented before translation.
Checkpoint Limitation
The repository contains the final checkpoint after 33,330 optimization steps rather than a separately retained best-validation checkpoint.
Evaluation Limitation
Automatic translation metrics do not fully capture:
- Semantic adequacy
- Fluency
- Terminology accuracy
- Factual consistency
- Human preference
- Domain-specific correctness
Human evaluation is recommended for comprehensive translation-quality assessment.
Bias, Risks, and Limitations
This fine-tuned model inherits potential biases and limitations from:
- The original mBART-50 pretrained model
- The multilingual data used to train the upstream model
- The IWSLT2015 English-Vietnamese fine-tuning corpus
- The limited domain coverage of the fine-tuning dataset
- Automatic tokenization and evaluation procedures
Generated translations should not automatically be assumed to be factually correct or appropriate for high-stakes use.
Recommendations
Users should:
- Evaluate the model on their intended target domain
- Perform human evaluation for important applications
- Avoid assuming automatic metrics guarantee translation correctness
- Segment text longer than the supported input length
- Verify translations in high-stakes settings
Experimental Context
This model is one of three controlled English-to-Vietnamese baselines:
| Model | Role |
|---|---|
| mBART-50 | Multilingual sequence-to-sequence baseline |
| NLLB-200-Distilled-600M | Multilingual machine translation baseline |
| EnViT5-Base | English-Vietnamese specialized baseline |
The experiments use the same:
- IWSLT2015 training split
- IWSLT2015 validation split
- IWSLT2015 test split
- Number of training epochs
- Batch size
- Gradient accumulation
- Learning rate
- AdamW optimizer
- Weight decay
- Learning-rate scheduler
- Maximum source length
- Maximum target length
- FP16 training
- Evaluation interval
- Beam size
- Maximum generation length
- Random seed
- Evaluation metrics
- Final-checkpoint selection rule
Model-specific language handling is preserved according to each pretrained architecture.
For mBART-50:
English: en_XX
Vietnamese: vi_VN
Reproducibility
Main experimental configuration:
Base model:
facebook/mbart-large-50-many-to-many-mmt
Dataset:
nguyenvuhuy/iwslt2015-en-vi
Translation direction:
English -> Vietnamese
Source language code:
en_XX
Target language code:
vi_VN
Train samples:
133317
Validation samples:
1268
Test samples:
1268
Epochs:
2
Training steps:
33330
Training batch size:
8
Evaluation batch size:
8
Gradient accumulation steps:
1
Effective batch size:
8
Learning rate:
5e-5
Optimizer:
AdamW
Weight decay:
0.01
LR scheduler:
Linear
Warmup ratio:
0.0
Maximum gradient norm:
1.0
Maximum source length:
128
Maximum target length:
128
FP16:
True
BF16:
False
Gradient checkpointing:
True
Evaluation interval:
5000 steps
Beam size:
5
Maximum generation length:
128
Evaluation accumulation steps:
8
Seed:
42
Data seed:
42
Compute Infrastructure
Hardware
- GPU: NVIDIA Tesla T4
- Number of GPUs: 1
- Training precision: FP16
Software
Main software configuration:
Transformers: 4.57.6
Datasets: 3.3.1
Accelerate: 1.12.0
SacreBLEU: 2.5.1
SentencePiece: 0.2.2
Technical Specifications
Architecture
The upstream model is mBART-50, a multilingual encoder-decoder Transformer designed for sequence-to-sequence generation and multilingual machine translation.
The many-to-many multilingual machine translation checkpoint supports direct translation between supported language pairs.
For target-language control, mBART uses the target language token as the forced beginning-of-sequence token.
For this experiment:
Source: en_XX
Target: vi_VN
The model is fine-tuned using supervised English-Vietnamese sentence pairs from IWSLT2015.
Checkpoint Information
The model represented by this repository is:
Base model:
facebook/mbart-large-50-many-to-many-mmt
Fine-tuning dataset:
nguyenvuhuy/iwslt2015-en-vi
Training epochs:
2
Final optimization step:
33330
Checkpoint selection:
Final checkpoint
Best scheduled validation BLEU:
34.5629 at step 30000
The step-30,000 weights were not separately retained because checkpoint saving was disabled during this baseline run.
Citation
If you use this model, please cite the mBART-50 work:
@article{tang2020multilingual,
title={Multilingual Translation with Extensible Multilingual Pretraining and Finetuning},
author={Yuqing Tang and Chau Tran and Xian Li and Peng-Jen Chen and
Naman Goyal and Vishrav Chaudhary and Jiatao Gu and Angela Fan},
year={2020},
eprint={2008.00401},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
The original mBART work can also be cited:
@article{liu2020multilingual,
title={Multilingual Denoising Pre-training for Neural Machine Translation},
author={Yinhan Liu and Jiatao Gu and Naman Goyal and Xian Li and
Sergey Edunov and Marjan Ghazvininejad and Mike Lewis and
Luke Zettlemoyer},
year={2020},
eprint={2001.08210},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
A citation for the associated English-Vietnamese study can be added if the study is published.
Model Card Author
Fine-tuned and documented for controlled English-to-Vietnamese neural machine translation experiments using mBART-50 and IWSLT2015.