CoolFace
Modelpublic

abdulhafis/growwithme-nana-nlu

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes2downloads
Model Card

GrowWithMe Nana NLU v2 — offline intent + subject classifier

On-device natural-language understanding for Nana, the AI care assistant in GrowWithMe, a maternal & child health app for Northern Ghana. When the phone has no internet, this model classifies what the caregiver said (in Ghanaian English / Pidgin, with SMS-style typos) so the app can act — replies are curated in-app; the model never generates text, so it cannot hallucinate health advice.

Files

FileWhat it is
model.kerasThe actual trained Keras model (full precision)
nana_nlu.tflitePortable mobile version (dynamic-range quantized, 1032 KB) — what the app downloads
manifest.jsonThe GrowWithMe model-registry manifest (feature contract, sha256)

Task

Input: one caregiver utterance → intent (one of 17) + subject (child / pregnancy / unknown).

Intents: starthealthcheck, openaddchild, openaddpregnancy, plandiet, readtoday, gettip, logweight, setreminder, greeting, helpother, askdangersigns, askfeedingquestion, askvaccine, findclinic, opencalendar, opentips, start_checkin

Metrics (this training run)

EvaluationResult
Held-out split (625 rows of generated data) — intent accuracy1.000
Held-out split — subject accuracy0.994
Hand-written HARD test (23 Pidgin sentences the generator never saw) — intent23/23
HARD test — subject22/23

Training data: 5201 examples from a Ghana-grounded generator (Pidgin constructions, SMS noise, local foods, hard negatives) + optional LLM distillation.

Featurizer contract (required to use the model)

Input is an L2-normalized 8192-dim hashed bag of features: lowercase; [^a-z0-9' ]→space; word unigrams u:tok, bigrams b:t1_t2, char trigrams c:xyz of ^tok$; bucket = FNV-1a-32(feature) % 8192. Output tensor = [17 intent probs] + [3 subject probs] concatenated. Reference implementations: ml/train_nana_nlu.ipynb (Python) and mobile/lib/data/model/nlu_service.dart (Dart) in the GrowWithMe repo.

Safety design

  • —The app runs a deterministic symptom-keyword check BEFORE this model; a symptom mention always routes to the health check regardless of model output.
  • —Below confidence 0.5 the app falls back to keyword matching.
  • —Decision support for app navigation only — not a medical device.