aishu15/english-tamil-colloquial
Viewer • Updated • 33k • 10
How to use aishu15/colloquial-tamil-fineetuned with Transformers:
# Load model directly
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("aishu15/colloquial-tamil-fineetuned")
model = AutoModelForSeq2SeqLM.from_pretrained("aishu15/colloquial-tamil-fineetuned")This model is a fine-tuned version of aishu15/colloquial-tamil-fineetuned on an unknown dataset. It achieves the following results on the evaluation set:
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 0.088 | 1.0 | 1997 | 0.0360 |
| 0.0592 | 2.0 | 3994 | 0.0236 |
| 0.0481 | 3.0 | 5991 | 0.0190 |
model_name = "aishu15/colloquial-tamil-fineetuned" tokenizer = AutoTokenizer.from_pretrained(model_name) model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
Load and test the model using Hugging Face Transformers:
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
# Load model and tokenizer
model_name = "aishu15/colloquial-tamil-fineetuned"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
# Function to translate text
def translate(text):
inputs = tokenizer(text, return_tensors="pt")
outputs = model.generate(**inputs, max_length=128)
return tokenizer.decode(outputs[0], skip_special_tokens=True)
# Example translations
test_sentences = [
"This is so beautiful",
"Bro, are you coming or not?",
"My mom is gonna kill me if I don't reach home now!"
]
for sentence in test_sentences:
print(f"English: {sentence}")
print(f"Colloquial Tamil: {translate(sentence)}\n")
Unable to build the model tree, the base model loops to the model itself. Learn more.