Results
Same script, same held-out sets, same 256-token windows for every row (lower perplexity is better).
Table with columns: Model, Answer ppl (Q&A), Wikipedia ppl, Wikipedia + web ppl| Model | Answer ppl (Q&A) | Wikipedia ppl | Wikipedia + web ppl |
|---|
| Hanuman-hi-42M (base) | 57.7 | 47.1 | 87.8 |
| Angad-hi-42M (SFT, no mixing) | 13.9 | 104.7 | 181.9 |
| Jambavan-hi-100M (base) | 28.3 | 44.2 | 30.8 |
| Angad-hi-100M (this model) | 10.6 | 62.1 | 38.9 |
- Better answers: answer perplexity 10.6 vs 13.9 for the 42M Angad.
- Smaller alignment tax: instruction tuning always makes a model worse at plain text. Angad-42M lost a lot (Wikipedia ppl 47.1 → 104.7). Mixing 15% pretraining batches cut that damage: this model's Wikipedia ppl goes 44.2 → 62.1 and web-text ppl 30.8 → 38.9, so it is far less degraded than the 42M Angad, whose web-text ppl rose from 87.8 to 181.9.
- Tax is not gone: perplexity on plain text still rises after SFT. The mix reduces it, it does not remove it.
<hi>प्रश्न: {your question}उत्तर:
The model ends its answer with </s> (id 3).
Usage
import torch, sentencepiece as spmfrom huggingface_hub import hf_hub_downloadfrom transformers import LlamaForCausalLM repo = "ashishpatel26/angad-hi-100m"model = LlamaForCausalLM.from_pretrained(repo)sp = spm.SentencePieceProcessor(model_file=hf_hub_download(repo, "spm.model")) def ask(q, max_new_tokens=150): x = torch.tensor([sp.encode(f"<hi>प्रश्न: {q}\nउत्तर: ")]) y = model.generate(x, max_new_tokens=max_new_tokens, do_sample=True, temperature=0.7, top_p=0.9, repetition_penalty=1.15, eos_token_id=sp.eos_id(), pad_token_id=sp.pad_id()) return sp.decode(y[0, x.shape[1]:].tolist()) print(ask("भारत की राजधानी क्या है?"))
Sample answers
Unedited, temperature 0.7, top-p 0.9, repetition penalty 1.15.
प्रश्न: भारत की राजधानी क्या है?
उत्तर: दिल्ली
प्रश्न: स्वस्थ रहने के तीन उपाय बताइए।
उत्तर: 1. अपनी सांसों को धीमा करें, क्योंकि आपको उन्हें आगे बढ़ने से रोकने की आवश्यकता है। 2. अपने शरीर में नमक और चीनी डालें, क्योंकि यह आपके पाचन तंत्र को उत्तेजित करता है। 3. अधिक पानी पीएँ, क्योंकि यह रक्त प्रवाह को बढ़ाता है और आपके शरीर को ऊर्जा प्रदान करता है।
प्रश्न: होली का त्योहार क्यों मनाया जाता है?
उत्तर: यह तब होता है जब कोई व्यक्ति अपने घर की सफाई करता है और रंगों से खुद को हराता है।
प्रश्न: पानी बचाने के दो तरीके बताइए।
उत्तर: पानी को बचाने का एक तरीका है कि इसे दूषित न किया जाए, बल्कि इसे साफ और स्वच्छ रखना है।
Read these carefully. The form is right and it now gets the capital correct, but the health tips are medically wrong ("add salt and sugar") and the Holi answer is nonsense. It has learned how to answer, not what is true.
Uses and limits
- Good for: learning how instruction tuning works end to end on consumer hardware; a Hindi Q&A toy; a baseline for small-model SFT experiments.
- Not for: any factual, medical, legal, financial or educational use. It states false things confidently. No safety alignment (no RLHF/DPO), single-turn only, 512-token SFT context (base context is 1,024).
Training
Table | |
|---|
| Base | Jambavan-hi-100M: 100.1M params, GQA (12 query / 4 KV heads), 12 layers, hidden 768, 1,024 context |
| Data | mashriram/AI4Bharat-Indic-Languages-and-Cultures: Hindi pairs from 9 Hindi-belt state configs, filtered to ≥80% Devanagari, Marathi dropped, exact dedup. 38,681 training examples (3,189 too long, removed), 393 validation. The dataset has no explicit licence; check the upstream terms before commercial use |
| Loss | Cross-entropy on answer tokens only; plain pretraining windows (512 tokens, full LM loss) replace 15% of micro-batches |
| Schedule | 2 epochs, 2,416 steps, 32 examples/step, AdamW lr 1e-4 → 1e-5 cosine, bf16, gradient checkpointing |
| Hardware / time | 1 × RTX 3060 Laptop 6 GB, about 4 hours |
Code: scripts/sft.py (MIX=0.15 CKPT=1)
Limitations
Hallucination, machine-translation artefacts and Western-centric content inherited from the data, no benchmark evaluation yet (IndicGLUE, IndicQA planned), residual alignment tax on plain text.
Citation
@misc{angad_hi_100m, title = {Angad-hi-100M: an instruction-tuned Hindi language model trained from scratch on a 6 GB GPU}, author = {ashishpatel26}, year = {2026}, url = {https://huggingface.co/ashishpatel26/angad-hi-100m}}