opus-mt-en-hi-finetuned

This model is a fine-tuned version of Helsinki-NLP/opus-mt-en-hi on an cfilt/iitb-english-hindi dataset. It achieves the following results on the evaluation set:

  • Loss: 2.6039
  • Bleu: 15.9001

Model description

This is a fine-tuned version of Helsinki-NLP/opus-mt-en-hi, a MarianMT-based English-to-Hindi translation model. It was fine-tuned as part of an NLP coursework assignment on translation model fine-tuning, using the full IIT Bombay English-Hindi parallel corpus.

The base model already had reasonable English-to-Hindi translation ability from its original OPUS pretraining, so this fine-tuning mainly adapts it to the phrasing and style conventions found in the IITB corpus rather than teaching translation from scratch.

Intended uses & limitations

This model translates English text to Hindi. It's intended for general-domain sentence-level translation, similar in scope to the IITB corpus it was fine-tuned on (a mix of software localization strings, general web text, and parallel sentence pairs).

Limitations:

  • Fine-tuned for only 2 epochs to keep training time reasonable on local hardware, so translation quality may be lower than a fully converged model trained for more epochs.
  • BLEU score (15.90 on the test set) is on the moderate side for English-Hindi MT; this is partly expected since BLEU tends to penalize Hindi outputs more than morphologically simpler target languages, even when the translation is fluent and correct.
  • Not evaluated on domain-specific text (e.g. medical, legal, or technical translation) - performance on those domains is unverified.
  • Trained on a fixed max sequence length of 128 tokens, so longer sentences may be truncated.

Training and evaluation data

Trained on the full cfilt/iitb-english-hindi dataset:

  • Train: 1,659,083 sentence pairs
  • Validation: 520 sentence pairs
  • Test: 2,507 sentence pairs

Each example is an English-Hindi sentence pair. Preprocessing tokenized both source and target text with the model's own tokenizer, truncating to a max length of 128 tokens for both input and target sequences.

Training procedure

  • Framework: Hugging Face Seq2SeqTrainer
  • Epochs: 2
  • Batch size: 24 (train and eval)
  • Learning rate: 2e-5
  • Mixed precision (fp16): enabled
  • Hardware: single local GPU (NVIDIA RTX 4060 Laptop GPU)

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 2e-05
  • train_batch_size: 24
  • eval_batch_size: 24
  • seed: 42
  • optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
  • lr_scheduler_type: linear
  • num_epochs: 2
  • mixed_precision_training: Native AMP

Training results

Training Loss Epoch Step Validation Loss Bleu
2.0303 1.0 69129 2.8119 14.0464
1.9203 2.0 138258 2.7148 14.7300

Final test set results: Loss: 2.6039, BLEU: 15.90

Framework versions

  • Transformers 5.12.1
  • Pytorch 2.11.0+cu128
  • Datasets 5.0.0
  • Tokenizers 0.22.2
Downloads last month
6
Safetensors
Model size
75.9M params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for SumitRathi/opus-mt-en-hi-finetuned

Finetuned
(65)
this model