pratham-commits/vaani-gujarati-slm
Vaani — Gujarati Small Language Model (~110M)
Submission: IAIRO / PRAMANA SLM++ · Domain: Medical QA (Gujarati) · Params: 109.5M (≤1B) · Base: trained from scratch
Vaani is a 110M-parameter Gujarati language model pretrained from scratch on a Gujarati corpus, then instruction-tuned and adapted to the medical-QA domain. It is built for Gujarati instruction following and grounded (open-book) medical question answering.
1. Model & Architecture
2. Domain & Task
- Domain: Medical (Gujarati).
- Primary task: Multiple-choice medical QA + Gujarati instruction following.
- End user / use case: Gujarati-language assistant for grounded medical reading comprehension (answering from provided context), not a source of unaided medical facts.
3. Data
4. Training
5. Post-Training (SFT)
6. Evaluation (self-reported internal eval)
Level 1 — Training health: PASS (all gates) — loss reduction 68.2% (10.53→3.35), convergence, no NaN/Inf, final val–train gap 2.0%.
6.1 Development progression (Vaani checkpoints)
MCQ = acc_norm, fixed n=80 Gujarati dev set. Instruction = rule-based checkers (9 buckets). Open-book = MedMCQA-gu val, closed vs with-context (raw-grounded).
Instruction-following rose 36% → 70% via targeted augmentation and format skills. Open-book (grounded) accuracy rose monotonically 30.8% → 38.2% → 44.1% across medical stages, lift growing +4.2 → +9.6 → +15.3. v6 (redacted-heavy) regressed vs v5, so v5 is submitted. On the larger cross-model sets, v5 scores MCQ 38.6% (n=145) and open-book with-context 44.1% (n=1,858).
6.2 Comparison vs external models
Same harness for all. MCQ = 145-item Gujarati set (acc_norm, log-likelihood); Instruction = rule-based checkers; Open-book = MedMCQA-gu val, with vs without context (Vaani n=1,858; external models n=500).
Takeaways:
- Instruction-following leads the field: Vaani 70% > gemma-2B 67%, Navarasa-2B 54%, Qwen-7B 53%. Even Qwen-7B fails exact-count lists (list_3/5 0%, numbered 14%) — skills Vaani was explicitly trained on.
- Open-book comprehension is best in test: Vaani 44.1% tops Qwen-7B (44.0%) and all 2B models. A 110M model leads on grounded reading.
- General MCQ: Vaani 38.6% beats gemma-2B (37.2%) and sarvam-2B (36.6%); trails Navarasa-2B (42.8%) and Qwen-7B (51%). Closed-book recall scales with size, as expected. Vaani is built to use provided context, not recall facts unaided.
7. Reproducibility
- Weights: https://huggingface.co/pratham-commits/vaani-gujarati-slm
- Datasets: https://huggingface.co/datasets/pratham-commits/vaani-gujarati-sft-data
- Inference: eval.py (research harness) / chat.py (interactive); greedy for structured/objective tasks (temp 0), sampling for open-ended.
- Dependencies: torch 2.9.1+cu129, transformers 4.57.6, tokenizers 0.22.2, huggingface_hub<1.0 (Python 3.10)
- Known limitations / failure modes:
- Closed-book medical factual recall is limited by 110M capacity; strongest when answering from provided context (open-book/RAG).
- Structured JSON output was learned only for the fixed schemas seen in training (e.g. name/age/city) and does not generalize to arbitrary keys — not exposed as a general capability. Exact-count lists require greedy decoding; sampling with no-repeat-ngram degrades them.
- Gujarati-only; not tuned for code-switching or other Indic languages.
8. Data Sources, Licenses & Attribution
Pretraining corpus (described, not re-hosted):
- AI4Bharat Sangraha (verified / unverified / synthetic, gu) — CC BY-4.0. Khan et al., 2024 (arXiv:2403.06350).
- Wikipedia (gu, 20231101) — CC BY-SA 4.0. Wikimedia Foundation.
- FineWeb-2 (guj_Gujr) — ODC-BY. Penedo et al., 2024 (arXiv:2406.17557).
Instruction SFT sources (in sft_v4.jsonl):
- Dolly (databricks-dolly-15k, translated to Gujarati) — CC BY-SA 3.0. Databricks.
- WikiHow (Gujarati) — derived from WikiHow content (CC BY-NC-SA); see license note below.
- Wiki_Chat — Wikipedia-derived instruction/QA (CC BY-SA).
- Anudesh (AI4Bharat IndicLLMSuite) was evaluated and dropped for quality; not included.
Medical data:
- MedMCQA — Pal, Umapathi & Sankarasubbu, 2022 (arXiv:2203.14371). MedMCQA-gu is a Gujarati translation of MedMCQA items, decontaminated against the held-out validation split.
External comparison models (benchmarked only, not redistributed): google/gemma-2-2b-it (Gemma Terms of Use), sarvamai/sarvam-1, Telugu-LLM-Labs/Indic-gemma-7b-finetuned-sft-Navarasa-2.0 (Gemma Terms of Use), Qwen/Qwen2.5-7B-Instruct (Apache-2.0).
License note: Vaani's weights are released under Apache-2.0. The SFT data combines sources under different licenses (CC BY-SA, and WikiHow-derived content under a non-commercial share-alike license). See the dataset card for per-source licensing; downstream users should respect each source's terms.
9. Citations
- Khan et al. (2024), IndicLLMSuite / Sangraha, arXiv:2403.06350
- Penedo et al. (2024), FineWeb / FineWeb-2, arXiv:2406.17557
- Pal, Umapathi & Sankarasubbu (2022), MedMCQA, arXiv:2203.14371
- Hoffmann et al. (2022), Chinchilla, arXiv:2203.15556; Sardana et al. (2024), arXiv:2401.00448
- Full design-decision references: see
DECISIONS.mdin the project repo.
Acknowledgements
Built during the IAIRO / PRAMANA SLM++ bootcamp.
