Views
No views yet
English → Tamil (Colloquial)Tamil (Colloquial) → Englishfacebook/m2m100_418M1from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
2
3tokenizer = AutoTokenizer.from_pretrained("Shrav20/colloquial-tamil-mt")
4model = AutoModelForSeq2SeqLM.from_pretrained("Shrav20/colloquial-tamil-mt")
5
6def translate(text, src_lang="en", tgt_lang="ta"):
7 inputs = tokenizer(text, return_tensors="pt", padding=True, truncation=True)
8 output = model.generate(**inputs)
9 return tokenizer.decode(output[0], skip_special_tokens=True)
10
11# Example Translation
12print(translate("The pharmacy is near the bus stop. ")) # Output: "Bus stop pakkathula pharmacy iruku."sangeethat/colloquialBatch Size: 16Learning Rate: 5e-5Epochs: 3Optimizer: AdamWPrecision: fp16 (mixed precision)LoRA Adapters: Enabled for efficient fine-tuning| English | Tamil (Colloquial) |
|---|---|
| The pharmacy is near the bus stop. | Bus stop pakkathula pharmacy iruku. |
| Take this medicine after food. | Food saptadhukku apram intha medicine eduthukungo. |
| Train tickets for tomorrow are available. | Naalaikku train tickets available iruku. |
@misc{shrav20colloquial,
author = {Shrav20},
title = {Colloquial Tamil Machine Translation Model},
year = {2025},
publisher = {Hugging Face},
url = {https://huggingface.co/Shrav20/colloquial-tamil-mt}
}