Downloads · 30 days
23
8% of all-time downloads
baban/MT_En_Hindi
MT_En_Hindi is a text generation model from baban. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as other.
should probably proofread and complete it, then remove this comment. --
Downloads · 30 days
23
8% of all-time downloads
All-time downloads
279
Public
Parameters
1.2B
7.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2.5 GB · 99%
From the Hugging Face model README
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
# Load tokenizer and model
model_name = "baban/MT_En_Hindi"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.bfloat16, device_map="auto")
source_text = "The weather is nice today."
prompt = f"Translate the following English sentence to Hindi:\n{source_text}"
messages = [
{"role": "user", "content": prompt}
]
# Tokenize the formatted input
input_ids = tokenizer.apply_chat_template(messages, return_tensors="pt").to(model.device)
with torch.no_grad():
output_ids = model.generate(
input_ids=input_ids,
max_new_tokens=100,
do_sample=False
)
# Decode and print only the new tokens (the response)
response = tokenizer.decode(output_ids[0][input_ids.shape[-1]:], skip_special_tokens=True)
print("\n=== Translation ===")
print(response)
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->
This model is a fine-tuned version of meta-llama/Llama-3.2-1B on the MT_En_Hindi 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: