CoolFace
Modelpublic

mechramc/marunthagam-maternal-E4B-Q4_K_M

sourceHugging Faceapache-2.0updated 5mo agoView on Hugging Face
0likes34downloads
Model Card

Marunthagam — Maternal Specialist (Gemma 4 E4B Q4KM)

Tamil community-health triage specialist fine-tuned on Gemma 4 E4B with Unsloth QLoRA, exported to Q4KM GGUF for offline phone deployment in rural Tamil Nadu by ASHA workers.

Part of the Marunthagam project (Gemma 4 Good Hackathon 2026): a three-tier offline health intelligence system. See the project README for the KALAVAI fusion architecture, dataset construction, the diagnostic methodology that surfaces label-quality and morphology issues, and the production-stack evaluation results.

Files

  • —gemma-4-e4b-it.Q4_K_M.gguf — quantised model (~5 GB), Q4KM
  • —gemma-4-e4b-it.BF16-mmproj.gguf — multimodal projector (~1 GB) — Gemma 4 multimodal requires this when image inputs are used
  • —Modelfile — Ollama Modelfile for ollama create

LoRA adapter

This repo includes the LoRA adapter weights at adapter/ (sprint-1 training, 3 epochs plain SFT on the original training distribution).

Training

Baseunsloth/gemma-4-E4B-it (4-bit QLoRA)
Rank / alpha / dropout32 / 64 / 0
Target modulesqproj, kproj, vproj, oproj, gateproj, upproj, down_proj
Epochs3
OptimizerAdamW, lr 2e-4, cosine schedule, 50 warmup steps
Train rows353
Test rows (held-out 80/10/10)45
Seed42
Best eval_loss1.912

Held-out evaluation (n=131, single seed 42, T=0)

The number that matters for ASHA-worker safety is the missed-emergency rate — gold-RED cases that ended up GREEN. The protocol engine + confidence floor + escalation logic catches 0/12 in the production routed config.

MetricResult
Weighted F10.6491
RED recall0.5833
Missed-emergency rate (RED→GREEN)0/12
Adversarial safety refusal100/100
Workstation TTFT / throughput0.007–0.038s · 195–213 tok/s
Tamil semantic similarity (multilingual mpnet cosine)0.6687

Production stack (Sprint 2 final)

  • —Routed inference by case specialist
  • —Triage: B-retrained LoRA (6 epochs plain SFT on relabeled data)
  • —Derm + Maternal: Sprint 1 LoRAs (sprint-1 derm beat the contamination-cleaned variant in head-to-head)
  • —Protocol engine v2.1: 21 active rules (15 migrated v1 IMNCI + 6 new adult-emergency rules with Tamil case-inflected forms)
  • —Multilingual safety classifier v2: ~135 indicators across English / Hindi (Devanagari) / Gujarati / Tamil with morphological coverage

Diagnostic findings worth re-using

This release is a hackathon submission, but three findings generalise beyond it:

  1. 1.Triage GREEN labels need clinical relabeling. A clinical reviewer judged 18% of triage GREEN labels as YELLOW or higher. The minority class in this kind of dataset carries the most labeling noise; relabel before you retrain.
  2. 2.Tamil regex needs morphology-aware patterns. The original safety classifier had 22/22 false negatives because it only covered locative case மருத்துவரிடம் and missed accusative மருத்துவரை அணுக, instrumental நாயினால், and Hindi/Gujarati script when the model code-switches.
  3. 3.Schema-consumer audit catches silent data loss. The eval pipeline discarded engine override traces in a throwaway local variable; took two sprint-internal patches to surface and fix.

Disclaimer

இது மருத்துவ ஆலோசனை அல்ல (this is not medical advice).

Always include the disclaimer in user-facing surfaces. The Pydantic schema in the project enforces this at the schema-validation layer.

License

Apache 2.0. Built by mechramc for the Gemma 4 Good Hackathon (deadline 2026-05-18).