Hinglish Song Generator
A fine-tuned Mistral 7B model that generates Hinglish promotional songs — a natural mix of English and Hindi/Urdu — from any user context. Give it a brand brief, event description, wedding theme, or motivational topic and it produces structured song lyrics with verse, chorus, and outro.
Demo
Try it live: Hinglish Song Generator Space
Sample output for prompt: "A clothing brand called DesiThreads launching their festive Diwali collection on October 20th for young Indians aged 18-35."
Verse 1:
Lights glow kar rahi hain har gali aur bazaar,
DesiThreads leke aaya naya fashion ka tyohaar.
October 20th ko khulega humne apna darwaaza,
Pura India karenge hum style ke hi baahaar.
Chorus:
Yeh desi vibes, yeh modern swag apna,
Festive season mein pura magic dikha apna.
Dil ki hai yaari aur sapnon ki udan,
Let's celebrate Diwali with DesiThreads ki shaan.
Verse 2:
Traditional designs ka naya twist laaye hain yaar,
Cuts hain trendy aur fit hai ekdum tight,
Zindagi ke safar mein ab look tera bright.
Outro:
Hausla buland hai aur dil mein hai josh,
DesiThreads ke sang aaj manao ye josh.
Model Details
- Developed by: Ekansh Patidar (@Ekansh16)
- Base model: mistralai/Mistral-7B-Instruct-v0.2
- Model type: Causal Language Model (MistralForCausalLM)
- Fine-tuning method: QLoRA (Quantized Low-Rank Adaptation)
- Languages: Hinglish (Hindi + English mixed), English prompts supported
- License: Apache 2.0
- Repository: This is the merged model (adapter weights merged into base)
- GGUF version (4-bit, 4.5GB): Ekansh16/hinglish-song-generator-gguf
How to Use
Basic Usage
from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
import torch
model_id = "Ekansh16/hinglish-song-generator-merged"
# Load with 4-bit quantization (recommended — saves memory)
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.float16,
bnb_4bit_use_double_quant=True,
)
tokenizer = AutoTokenizer.from_pretrained(model_id)
tokenizer.pad_token = tokenizer.eos_token
model = AutoModelForCausalLM.from_pretrained(
model_id,
quantization_config=bnb_config,
device_map="auto",
)
model.eval()
Generate a Song
def generate_song(context: str) -> str:
# Use exact Mistral instruction format
prompt = f"<s>[INST] {context} [/INST]"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=400,
temperature=0.8,
top_p=0.92,
top_k=50,
do_sample=True,
repetition_penalty=1.2,
pad_token_id=tokenizer.eos_token_id,
)
input_len = inputs["input_ids"].shape[1]
return tokenizer.decode(outputs[0][input_len:], skip_special_tokens=True)
# Example
context = """
A startup called ZapCart is launching their electric scooter on August 1st.
Target audience is young Indians aged 18-30.
Vibe should be energetic and aspirational.
"""
print(generate_song(context))
Prompt Tips
Write rich, descriptive prompts for best results. Include:
- Brand or event name
- Key dates or details
- Target audience
- Desired tone (fun, emotional, energetic, festive)
Good prompt example:
A wedding sangeet ceremony. Groom from Delhi, bride from Jaipur.
Fun, filmy, and emotional Bollywood style.
Poor prompt example:
Make a song
Training Details
Training Data
5,952 training examples combining two sources:
| Source | Examples | Purpose |
|---|---|---|
| Retro Bollywood lyrics dataset (cleaned) | 3,613 | Teaches Hinglish vocabulary, rhyme patterns, and song structure |
| Synthetically generated promotional examples (Gemini API) | 1,000 × 3 oversampled | Teaches context-aware generation for brands, events, and promotions |
The synthetic dataset was generated using Gemini API with 29 varied context templates covering brand launches, weddings, festivals, college events, fitness, motivational themes, and travel.
Training Procedure
Hardware: Kaggle T4 GPU (free tier)
Fine-tuning configuration:
# QLoRA settings
load_in_4bit = True
bnb_4bit_quant_type = "nf4"
bnb_4bit_compute_dtype = torch.float16
bnb_4bit_use_double_quant = True
# LoRA settings
lora_r = 16
lora_alpha = 32
lora_dropout = 0.05
target_modules = ["q_proj", "k_proj", "v_proj", "o_proj",
"gate_proj", "up_proj", "down_proj"]
# Training settings
num_epochs = 3
batch_size = 2
gradient_accumulation_steps = 8 # effective batch = 16
learning_rate = 2e-4
optimizer = "paged_adamw_8bit"
lr_scheduler = "cosine"
max_seq_length = 512
Training results:
| Step | Train Loss | Val Loss |
|---|---|---|
| 100 | 1.4139 | 1.4801 |
| 400 | 1.0916 | 1.1241 |
| 700 | 0.8274 | 0.7981 |
| 1000 | 0.2149 | 0.6154 |
| 1100 | 0.1879 | 0.6069 |
- Total training steps: 1,116
- Total training time: ~11 hours 20 minutes on T4
- Final validation loss: 0.6069
Model Architecture
- Architecture: MistralForCausalLM
- Parameters: 7 billion
- Precision: Merged in bfloat16
- Context window: 32,768 tokens (trained), 1,024–2,048 recommended for inference
Output Format
The model always generates in this structure:
Verse 1:
[4 lines, rhyming]
Chorus:
[4 catchy, repeatable lines]
Verse 2:
[4 lines, rhyming]
Outro:
[2 closing lines]
Hinglish style characteristics:
- English grammatical structure
- Hindi/Urdu words woven in naturally (yaar, dil, zindagi, sapna, mehnat, hausla)
- Brand names and event details incorporated organically
- Rhyme scheme maintained throughout
Limitations
- Output quality depends heavily on prompt richness — vague prompts produce generic songs
- Occasional hallucinations in outro (emojis, hashtags) — strip with post-processing if needed
- Not suitable for generating songs about harmful, violent, or offensive themes
- Primarily trained on promotional and celebratory contexts — may be weaker on abstract themes
- Output is always in Hinglish — does not generate pure Hindi (Devanagari) or pure English
Use Cases
✅ Brand promotional songs and jingles
✅ Wedding sangeet and event songs
✅ Festival and Diwali/Holi themed songs
✅ Motivational and sports anthems
✅ Social media reel background lyrics
✅ Birthday and farewell songs
❌ Pure Hindi poetry or Devanagari output
❌ Classical music or formal compositions
❌ Languages other than Hinglish/English
Related Resources
- GGUF version (recommended for local inference): Ekansh16/hinglish-song-generator-gguf
- Live demo: HuggingFace Space
- Base model: mistralai/Mistral-7B-Instruct-v0.2
Citation
If you use this model in your work, please cite:
@misc{hinglish-song-generator-2025,
author = {Ekansh Patidar},
title = {Hinglish Song Generator: Fine-tuned Mistral 7B for Hinglish Lyric Generation},
year = {2026},
publisher = {HuggingFace},
url = {https://huggingface.co/Ekansh16/hinglish-song-generator-merged}
}