Intended uses
- Translating English text into natural, romanized Hinglish (chat, social, news summarization for Indian audiences).
- Research on code-switched and low-resource NLP for South Asian languages.
- A starting checkpoint for further fine-tuning on other code-mixed registers.
Out of scope: formal Hindi (Devanagari) translation; Hinglish → English (this model is unidirectional); safety-critical applications without human review.
How to use
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,
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."))
GGUF quantizations are included in this repo for llama.cpp / Ollama use.
Training details
- Method: QLoRA (4-bit) using Unsloth and HuggingFace TRL — approximately 2x faster training.
- Data: English ↔ Hinglish sentence pairs from the News_Hinglish_English corpus (news domain).
- Format: instruction-tuned prompt ("Translate the input from English to Hinglish").
Training loss:

Evaluation
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.
Limitations & bias
- Trained primarily on news-domain text; heavy slang or regional registers may be less natural.
- Outputs romanized Hinglish only — no Devanagari.
- Code-mixing ratio reflects the training corpus and may not match every audience's preference.
- Inherits biases present in Llama 3 and the source news corpus.
Citation
@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}
}