Downloads · 30 days
7
21% of all-time downloads
Vishal94/t5-small-en-hi-v1
t5-small-en-hi-v1 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.
- Developed by: [Vishal Prem] - Model type: [Machine Translation] - Language(s) (NLP): [English,Hindi] - Finetuned from model [optional]: [Flan-T5]
Downloads · 30 days
7
21% of all-time downloads
All-time downloads
34
Public
Parameters
97M
389 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors388 MB · 97%
From the Hugging Face model README
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer, T5Tokenizer, T5ForConditionalGeneration
hf_repo_name = "Vishal94/t5-small-en-hi-v1"
# Load model and tokenizer from Hugging Face Hub
tokenizer = T5Tokenizer.from_pretrained(hf_repo_name)
model = T5ForConditionalGeneration.from_pretrained(hf_repo_name)
# Example input
input_text = "Translate English to Hindi: 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)