πŸš€ English-to-Tamil Translation β€” Fine-Tuned M2M100 (Stage 4)

Model ID: gopi30/english-to-tamil-stage4
Model Type: M2M100ForConditionalGeneration
Language Pair: English ➑ Tamil
Framework: πŸ€— Transformers


πŸ“Œ Model Summary

This model is the Stage 4 fine-tuned version of Facebook's M2M100 (418M) Multilingual Machine Translation model for English-to-Tamil translation. It builds on the improvements made in Stage 3 and incorporates more targeted domain-specific training to enhance translation fluency, contextual accuracy, and Tamil grammar structure.


βœ… Improvements Over Stage 3

  • Trained with cleaner and more diverse parallel English-Tamil sentence pairs
  • Better handling of idioms and complex sentence structures
  • Enhanced translation consistency and Tamil morphology
  • Optimized tokenizer usage for more accurate sentence segmentation

πŸ“ˆ Use Cases

  • Translating English educational content to Tamil
  • Localizing web and mobile apps for Tamil-speaking audiences
  • Assisting in communication for native Tamil speakers
  • Voice assistants and accessibility tools

🧩 Base Model

  • Base: facebook/m2m100_418M
  • Languages Fine-Tuned: en ➑ ta

πŸ“¦ Installation

Make sure you have the transformers library installed:

pip install transformers

Via Transformers Library

Code

from transformers import M2M100ForConditionalGeneration, M2M100Tokenizer

model_path = "gopi30/english-to-tamil-stage4"
model = M2M100ForConditionalGeneration.from_pretrained(model_path)
tokenizer = M2M100Tokenizer.from_pretrained(model_path)

def translate_en_to_ta(text):
    tokenizer.src_lang = "en"
    encoded = tokenizer(text, return_tensors="pt")
    generated = model.generate(**encoded, forced_bos_token_id=tokenizer.get_lang_id("ta"))
    return tokenizer.decode(generated[0], skip_special_tokens=True)

# Example
print(translate_en_to_ta("Hello!"))
Downloads last month
55
Safetensors
Model size
484M params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support