Downloads · 30 days
351
9% of all-time downloads
suyash2739/English_to_Hinglish_fintuned_lamma_3_8b_instruct
English_to_Hinglish_fintuned_lamma_3_8b_instruct is a translation model from suyash2739. Use it when you need text moved from one language to another. It is set up for transformers. The card lists the license as apache-2.0.
Llama 3 8B Instruct fine-tuned with QLoRA to translate standard English into Hinglish — the romanized Hindi-English code-mixed register used in everyday informal communication across India.
Downloads · 30 days
351
9% of all-time downloads
All-time downloads
3.9K
Public
Repo size
6.3 GB
Likes
1
Public
Click a slice to open those files.
.gguf4.9 GB · 78%
From the Hugging Face model README
Llama 3 8B Instruct fine-tuned with QLoRA to translate standard English into Hinglish — the romanized Hindi-English code-mixed register used in everyday informal communication across India.
unsloth/llama-3-8b-Instruct-bnb-4bitOut of scope: formal Hindi (Devanagari) translation; Hinglish → English (this model is unidirectional); safety-critical applications without human review.
pip install "unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git"
pip install --no-deps xformers trl peft accelerate bitsandbytes
from unsloth import FastLanguageModel
import torch
model, tokenizer = FastLanguageModel.from_pretrained(
model_name="suyash2739/English_to_Hinglish_fintuned_lamma_3_8b_instruct",
max_seq_length=2048,
dtype=None, # auto-detect; float16 for T4/V100, bfloat16 for Ampere+
load_in_4bit=True,
)
def translate(text):
prompt = """Translate the input from English to Hinglish to give the response.
### Input:
{}
### Response:
"""
inputs = tokenizer([prompt.format(text)], return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=2048, use_cache=True)
raw = tokenizer.batch_decode(outputs)[0]
return raw.split("### Response:\n")[1].split("<|eot_id|>")[0]
print(translate("This is a fine-tuned Hinglish translation model using Llama 3."))
# Yeh ek fine-tuned Hinglish translation model hai jo Llama 3 ka istemal karta hai.
GGUF quantizations are included in this repo for llama.cpp / Ollama use.
Training loss:

Qualitative side-by-side with GPT-4o on held-out news text:
English input:
Finance Minister Nirmala Sitharaman said, "There used to be a poverty index...a human development index and all of them continue, but today what is keenly watched is VIX, the volatility index of the markets." Stability of the government is important for markets to be efficient, she stated. PM Narendra Modi's third term will make markets function with stability, she added.
GPT-4o:
Finance Minister Nirmala Sitharaman ne kaha, "Pehle ek poverty index hota tha...ek human development index hota tha aur yeh sab ab bhi hain, lekin aaj jo sabse zyada dekha ja raha hai, woh hai VIX, jo markets ka volatility index hai." Unhone kaha ki sarkar ki stability markets ke efficient hone ke liye zaroori hai. PM Narendra Modi ka teesra term markets ko stability ke saath function karne mein madad karega, unhone joda.
This model:
Finance Minister Nirmala Sitharaman ne kaha, "Pehle ek poverty index hota tha... ek human development index hota tha aur sab kuch ab bhi chal raha hai, lekin aaj jo kaafi zyada dekha ja raha hai, woh VIX hai, jo markets ki volatility ka index hai." Unhone kaha ki markets ke liye sarkar ki stability zaroori hai. PM Narendra Modi ke teesre term se markets stability ke saath function karenge, unhone joda.
Quantitative benchmarks (BLEU / chrF on a held-out test split, vs GPT-4o and base Llama 3 zero-shot) are in progress and will be added here.
@misc{agarwal2024newshinglish,
author = {Agarwal, Suyash},
title = {News\_Hinglish\_English: An English--Hinglish Parallel Corpus},
year = {2024},
publisher = {Hugging Face},
doi = {10.57967/hf/5120},
url = {https://huggingface.co/datasets/suyash2739/News_Hinglish_English}
}