Hinglish → English (Qwen2.5-1.5B, fine-tuned)
This small model turns Hinglish into clean, natural English. Hinglish here means Hindi typed in Roman script and mixed with English, the way people in India write on WhatsApp, Slack and SMS. The model keeps names, numbers, dates and times intact.
| Hinglish | This model |
|---|---|
| Maine 7 pm ko meeting ke liye 5000 line ka code fix kr diya, kya abhi bhi kuch bhi karna hai? | I fixed 5000 lines of code for the meeting at 7 PM. Is there anything else I need to do? |
| Bhai maine ek spot dekha hai jaha hum 15000 mein 4 se 5 baje khana khayenge | Bro, I found a spot where we can eat for ₹15,000 between 4 and 5 PM. |
| yaar aaj gym nahi aa paunga, kal subah 6 baje pakka milte hai | Dude, won't be able to go to the gym today, will meet you at 6 am tomorrow |
Try it: see the usage code below. It runs on a free Colab T4 or any laptop GPU.
Results
The test set has 300 held-out sentences that the model never saw in training: 150 come from the public dataset and 150 are everyday or work messages. Decoding is greedy. Scores are corpus-level (sacrebleu).
| Test set | Base Qwen2.5-1.5B-Instruct (chrF++ / BLEU) | This model (chrF++ / BLEU) |
|---|---|---|
| All 300 | 43.5 / 18.8 | 67.9 / 50.9 |
| Everyday / work messages | 42.7 / 18.8 | 66.1 / 49.9 |
| findnitai held-out | 45.5 / 18.9 | 72.1 / 53.4 |
How to use
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "adityamangal98/hinglish2english-qwen2.5-1.5b"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype="auto", device_map="auto")
SYSTEM = ("You rewrite Hinglish (Hindi typed in Roman script, mixed with English) into clear, natural English. "
"Keep the meaning, tone, names, numbers and times exactly. Reply with only the English text.")
msgs = [{"role": "system", "content": SYSTEM},
{"role": "user", "content": "Bhai kal ki meeting 4 baje shift kar do, client ka call clash ho raha hai"}]
enc = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt", return_dict=True).to(model.device)
out = model.generate(**enc, max_new_tokens=120, do_sample=False)
print(tok.decode(out[0][enc["input_ids"].shape[1]:], skip_special_tokens=True))
Always use the system prompt above, because the model was trained with it.
Training
- Base model: Qwen/Qwen2.5-1.5B-Instruct (Apache-2.0)
- Method: LoRA (r=16, alpha=32, all attention and MLP projections), bf16, 2 epochs, lr 2e-4 with a cosine schedule, max length 256. The loss covers the completion only. The adapter was merged into the base weights.
- Hardware: a single RTX 4070 laptop GPU (8 GB), about 60 minutes.
- Data: 18.4k training examples.
- About 14k pairs from findnitai/english-to-hinglish (Apache-2.0). The pairs were reversed to go Hinglish → English and filtered so the input really is Hindi-structured Hinglish.
- About 1.45k synthetic everyday and work messages, upsampled 3×. These are published as adityamangal98/hinglish-english-everyday-synthetic. They were generated locally with an Apache-2.0 open model (Qwen3-VL-8B-Instruct) across 38 topics, 8 tones and 6 spelling styles, then filtered and de-duplicated.
Limitations
- The model sometimes flips who did what. For example, "maine sabko bataya tha" can become "everyone told me".
- "kal" can mean either yesterday or tomorrow, and the model guesses from context.
- The references for the everyday test set were written by the same teacher model that generated the training data, so real-world scores may be lower than the table shows.
- It is not built for long documents, Devanagari script, or translating pure Hindi into formal English.
- Do not use it for legal, medical or other high-stakes text without human review.
Author
Built by Aditya Mangal (Instagram @techwithadityamangal) as an open, laptop-trained demo of small-model fine-tuning.