NLLB-200-distilled-600M fine-tuned: Marathi β Hindi
This model is a fine-tuned version of facebook/nllb-200-distilled-600M for Marathi (mar_Deva) to Hindi (hin_Deva) machine translation.
Model description
- Base model: facebook/nllb-200-distilled-600M (distilled NLLB-200, 600M parameters)
- Architecture: M2M100ForConditionalGeneration (encoder-decoder Transformer)
- Source language: Marathi β FLORES-200 code
mar_Deva - Target language: Hindi β FLORES-200 code
hin_Deva - Tokenizer: original NLLB-200 SentencePiece tokenizer (
sentencepiece.bpe.model), unchanged from the base model
Intended uses
Single-direction machine translation from Marathi to Hindi. For general-purpose multi-language translation, use the original facebook/nllb-200-distilled-600M instead β this checkpoint is specialized for the mar_Deva β hin_Deva direction only.
How to use
import torch
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
model_id = "helloboyn/translate-marathi-hindi"
tokenizer = AutoTokenizer.from_pretrained(model_id, src_lang="mar_Deva")
model = AutoModelForSeq2SeqLM.from_pretrained(model_id)
text = "your Marathi input text here"
inputs = tokenizer(text, return_tensors="pt")
translated_tokens = model.generate(
**inputs,
forced_bos_token_id=tokenizer.convert_tokens_to_ids("hin_Deva"),
max_length=200,
)
print(tokenizer.batch_decode(translated_tokens, skip_special_tokens=True)[0])
Training procedure
Fine-tuned from facebook/nllb-200-distilled-600M with the Hugging Face Trainer.
Training hyperparameters
- learning_rate: 2e-05
- train_batch_size: 32
- eval_batch_size: 32
- seed: 42
- optimizer: AdamW (torch fused)
- lr_scheduler_type: linear
- num_epochs: 3
- mixed_precision_training: fp16
Framework versions
- Transformers 4.38.2
- PyTorch
Limitations and bias
This model is trained for a single translation direction (mar_Deva β hin_Deva) and has not been evaluated on out-of-domain text. Translation quality for low-resource languages such as Hindi can vary significantly by domain and sentence length. As with the base NLLB-200 model, it may reflect biases present in its training data.
License
This model is derived from facebook/nllb-200-distilled-600M, which is released under the CC-BY-NC-4.0 license. This fine-tuned checkpoint is distributed under the same license and is intended for non-commercial use.
- Downloads last month
- 5
Model tree for helloboyn/translate-marathi-hindi
Base model
facebook/nllb-200-distilled-600M