Instructions to use amaniee/zekra-care-companion-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT-LM
How to use amaniee/zekra-care-companion-model with LiteRT-LM:
# LiteRT-LM runs on various platforms (Android, iOS, Windows, Linux, macOS, IoT, Web/WASM) # and supports many APIs (C++, Python, Kotlin, Swift, JavaScript, Flutter). # For platform-specific integration guides, please refer to the official developer website: # https://ai.google.dev/edge/litert-lm # To try LiteRT-LM, the easiest way is to use our CLI tool. # 1. Install the LiteRT-LM CLI tool: pip install -U litert-lm # 2. Download and run this model locally: # See: https://ai.google.dev/edge/litert-lm/cli litert-lm run \ --from-huggingface-repo=amaniee/zekra-care-companion-model \ --prompt="Write me a poem"
- Notebooks
- Google Colab
- Kaggle
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