Downloads · 30 days
6
26% of all-time downloads
Vishal94/t5-small-en-ta-v0.6
t5-small-en-ta-v0.6 is a machine learning model from Vishal94. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers.
Pure English to Tamil translation model. Start with the prefix "Translate English to Tamil:" to translate a sentence.
Downloads · 30 days
6
26% of all-time downloads
All-time downloads
23
Public
Parameters
76.9M
309 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors308 MB · 99%
From the Hugging Face model README
Pure English to Tamil translation model. Start with the prefix "Translate English to Tamil:" to translate a sentence.
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer, T5Tokenizer, T5ForConditionalGeneration
import os
hf_repo_name = "Vishal94/t5-small-en-ta-v0.6"
tokenizer = T5Tokenizer.from_pretrained(hf_repo_name)
model = T5ForConditionalGeneration.from_pretrained(hf_repo_name)
# Example input
input_text = "Translate English to Tamil: What are you doing today?"
# Tokenize input
inputs = tokenizer(input_text, return_tensors="pt", padding=True)
# Generate output
outputs = model.generate(**inputs, max_new_tokens=64)
result = tokenizer.decode(outputs[0], skip_special_tokens=True)
print("Output:", result)