Zekra Care Companion Model

A Gemma 4 E2B-IT model fine-tuned (LoRA) for the Zekra Alzheimer's care companion app. Distilled into a single quantized .litertlm bundle for on-device inference via Google AI Edge LiteRT-LM.

This is the post-hackathon publication. The original Kaggle Gemma 4 Good Hackathon submission artifact is hosted separately at amaniee/zekra-memory-assistant and remains untouched.

What it does

Tool-calling companion model for a person with mild-to-moderate Alzheimer's. Trained to:

  • Recognize when to fire a tool vs respond in prose (12 tools: face recognition, family lookup, medication tracking, reminders, location orientation, safety escalation, capability surfacing).
  • Maintain a warm, brief, one-sentence register matched to dementia-care best practices (no quizzing; orientation as hero; never refuse).
  • Escalate to a caregiver under unambiguous severe-distress signals (suicidal ideation, fall, chest pain) while staying with the patient for routine worries.

Designed to run entirely on-device โ€” no network during inference. Patient data (photos, family graph, medication schedule) never leaves the phone.

Files

  • model.litertlm โ€” packaged Gemma 4 E2B-IT + LoRA, quantized to fit on a Pixel-class device.

Intended use

  • On-device inference inside the Zekra Flutter app, running through flutter_gemma / litert-lm.
  • Research / educational use under the Gemma Terms of Use.

Out of scope

  • Not a substitute for medical, clinical, or emergency care.
  • Not designed for general-purpose chat outside the dementia-care companion context.
  • Not validated for languages other than English.

Training

  • Base model: unsloth/gemma-4-E2B-it
  • Method: Unsloth LoRA (attention-only โ€” required by the LiteRT runtime constraint that runtime LoRA applies to language attention only)
  • Corpus: ~4,000 multi-turn care-dialogue rows, hand-curated, generated through a multi-stage interactive pipeline (Claude ร— Gemma 4 agents with mechanical-rule judges).
  • Tool-mask correction (2026-05-19): post-hackathon training fixed a masking bug where <|tool_response> regions were unintentionally in the supervised loss โ€” previously training the model to generate tool result strings (hallucination). The current model is trained on the correct objective (assistant prose + tool calls only).
  • Quantization: dynamic INT8 weights via the Google AI Edge LiteRT-LM converter (weight_only_wi8_afp32). The mixed-precision path (FFN-INT4) is documented in the repo but produces bundles that trip an OpenCL delegate shape-mismatch โ€” pinned for a future release once the upstream toolchain settles.

License

This model is released under the Gemma Terms of Use. You agree to comply with Google's Prohibited Use Policy.

Citation

If you use this model in research, please cite both the upstream Gemma model and the Zekra project:

@misc{zekra2026,
  title  = {Zekra: An Alzheimer's Care Companion},
  author = {El-Hajj, Amanie},
  year   = {2026},
  url    = {https://github.com/aelhajj/zekra-ai},
  note   = {Kaggle Gemma 4 Good Hackathon submission, Health & Sciences track}
}

@misc{gemma4,
  title  = {Gemma 4},
  author = {Google},
  year   = {2026},
  url    = {https://ai.google.dev/gemma}
}

Companion model

The face-recognition embedder used alongside this language model is published separately at amaniee/zekra-face-embedder because it derives from InsightFace and carries a non-commercial-research license. The two models are independent and licensed under different terms.

Downloads last month
6
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for amaniee/zekra-care-companion-model

Adapter
(44)
this model