Text Generation
ONNX
LiteRT
LiteRT-LM
English
flutter_gemma
on-device
mobile
gemma
gemma-4
flutter
healthcare
dementia
alzheimers
face-recognition
arcface
kaggle-gemma-4-good-hackathon
Instructions to use amaniee/zekra-memory-assistant with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT
How to use amaniee/zekra-memory-assistant with LiteRT:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- LiteRT-LM
How to use amaniee/zekra-memory-assistant with LiteRT-LM:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Correct base model: Gemma 4 E2B (litert-community/gemma-4-E2B-it-litert-lm)
Browse files
README.md
CHANGED
|
@@ -3,21 +3,22 @@ license: mit
|
|
| 3 |
language:
|
| 4 |
- en
|
| 5 |
base_model:
|
| 6 |
-
-
|
|
|
|
| 7 |
tags:
|
| 8 |
- litert
|
| 9 |
- litert-lm
|
| 10 |
- on-device
|
| 11 |
- mobile
|
| 12 |
- gemma
|
| 13 |
-
- gemma-
|
| 14 |
- flutter
|
| 15 |
- healthcare
|
| 16 |
- dementia
|
| 17 |
- alzheimers
|
| 18 |
- face-recognition
|
| 19 |
- arcface
|
| 20 |
-
- kaggle-gemma-
|
| 21 |
pipeline_tag: text-generation
|
| 22 |
library_name: flutter_gemma
|
| 23 |
---
|
|
@@ -28,7 +29,7 @@ library_name: flutter_gemma
|
|
| 28 |
|
| 29 |
**Website:** [zekra.live](https://zekra.live)
|
| 30 |
**App source:** [github.com/aelhajj/zekra-ai](https://github.com/aelhajj/zekra-ai)
|
| 31 |
-
**Submission:** Kaggle **Gemma
|
| 32 |
|
| 33 |
Zekra helps people with Alzheimer's recognize the faces around them and recall the stories that go with those faces. A caregiver builds a small graph of the family β who everyone is, how they are related, the photos and memories that matter. The patient lifts the phone, points the camera at someone, and Zekra tells the story warmly:
|
| 34 |
|
|
@@ -42,17 +43,17 @@ Two on-device models powering the Zekra Flutter app:
|
|
| 42 |
|
| 43 |
| File | Size | Purpose |
|
| 44 |
|---|---|---|
|
| 45 |
-
| [`model-dyn-wi8-afp32.litertlm`](./model-dyn-wi8-afp32.litertlm) | 5.1 GB | Fine-tuned **Gemma
|
| 46 |
| [`arcface_zekra_r50_fp16.onnx`](./arcface_zekra_r50_fp16.onnx) | 83 MB | Fine-tuned **InsightFace ArcFace** face embedder (ResNet50, 512-dim, fp16) for cross-age + kinship-aware face verification, served via `onnxruntime`. |
|
| 47 |
|
| 48 |
Both files are dropped into the Flutter app's private documents folder at runtime (see deployment recipe below).
|
| 49 |
|
| 50 |
-
## Gemma
|
| 51 |
|
| 52 |
-
Fine-tuned from **[`
|
| 53 |
|
| 54 |
**Training**
|
| 55 |
-
- **Base:** Gemma
|
| 56 |
- **Method:** Unsloth LoRA β all-linear, r=16, Ξ±=32 β then merged into the base for export
|
| 57 |
- **Corpus:** 3,198 hand-curated turns across 19 waves, generated by ~9 Flutter instances running in parallel on an M4 MacBook (Claude played the patient, Gemma played the companion), LLM-judged per batch
|
| 58 |
- **Doctrine:** **never quiz, just tell** β backed by Tom Kitwood's *Dementia Reconsidered* (1997) and the DAWN Method's guidance against recall-testing
|
|
@@ -95,8 +96,8 @@ face crop
|
|
| 95 |
512-dim embedding
|
| 96 |
β ObjectBox HNSW cosine search
|
| 97 |
PersonEntity match βββ graph lookup (relationship, recent memories, photos)
|
| 98 |
-
β prompt assembly + Gemma
|
| 99 |
-
Gemma
|
| 100 |
β
|
| 101 |
warm sentence (TTS optional)
|
| 102 |
```
|
|
@@ -122,7 +123,7 @@ Both files land in `/data/user/0/com.zekra.zekra/app_flutter/`. The app picks th
|
|
| 122 |
|
| 123 |
## License
|
| 124 |
|
| 125 |
-
MIT (this repo). Upstream licenses apply to the base models β see [Gemma terms](https://ai.google.dev/gemma/terms) for the LLM base and the [InsightFace license](https://github.com/deepinsight/insightface/blob/master/LICENSE) for the ArcFace backbone.
|
| 126 |
|
| 127 |
## Citation
|
| 128 |
|
|
@@ -132,7 +133,7 @@ MIT (this repo). Upstream licenses apply to the base models β see [Gemma terms
|
|
| 132 |
author = {El Hajj, Amanie and El Hajj, Hadi},
|
| 133 |
year = {2026},
|
| 134 |
url = {https://zekra.live},
|
| 135 |
-
note = {Kaggle Gemma
|
| 136 |
}
|
| 137 |
```
|
| 138 |
|
|
|
|
| 3 |
language:
|
| 4 |
- en
|
| 5 |
base_model:
|
| 6 |
+
- litert-community/gemma-4-E2B-it-litert-lm
|
| 7 |
+
- google/gemma-4-E2B-it
|
| 8 |
tags:
|
| 9 |
- litert
|
| 10 |
- litert-lm
|
| 11 |
- on-device
|
| 12 |
- mobile
|
| 13 |
- gemma
|
| 14 |
+
- gemma-4
|
| 15 |
- flutter
|
| 16 |
- healthcare
|
| 17 |
- dementia
|
| 18 |
- alzheimers
|
| 19 |
- face-recognition
|
| 20 |
- arcface
|
| 21 |
+
- kaggle-gemma-4-good-hackathon
|
| 22 |
pipeline_tag: text-generation
|
| 23 |
library_name: flutter_gemma
|
| 24 |
---
|
|
|
|
| 29 |
|
| 30 |
**Website:** [zekra.live](https://zekra.live)
|
| 31 |
**App source:** [github.com/aelhajj/zekra-ai](https://github.com/aelhajj/zekra-ai)
|
| 32 |
+
**Submission:** Kaggle **Gemma 4 Good Hackathon** β Impact Track (Health & Sciences), with eligibility for the **LiteRT** and **Unsloth** Special Technology Tracks. Deadline 2026-05-18.
|
| 33 |
|
| 34 |
Zekra helps people with Alzheimer's recognize the faces around them and recall the stories that go with those faces. A caregiver builds a small graph of the family β who everyone is, how they are related, the photos and memories that matter. The patient lifts the phone, points the camera at someone, and Zekra tells the story warmly:
|
| 35 |
|
|
|
|
| 43 |
|
| 44 |
| File | Size | Purpose |
|
| 45 |
|---|---|---|
|
| 46 |
+
| [`model-dyn-wi8-afp32.litertlm`](./model-dyn-wi8-afp32.litertlm) | 5.1 GB | Fine-tuned **Gemma 4 E2B** care-dialogue model, exported as a `.litertlm` bundle for **LiteRT-LM** (GPU full-delegation on Pixel 9 Pro). |
|
| 47 |
| [`arcface_zekra_r50_fp16.onnx`](./arcface_zekra_r50_fp16.onnx) | 83 MB | Fine-tuned **InsightFace ArcFace** face embedder (ResNet50, 512-dim, fp16) for cross-age + kinship-aware face verification, served via `onnxruntime`. |
|
| 48 |
|
| 49 |
Both files are dropped into the Flutter app's private documents folder at runtime (see deployment recipe below).
|
| 50 |
|
| 51 |
+
## Gemma 4 E2B β care-dialogue fine-tune
|
| 52 |
|
| 53 |
+
Fine-tuned from **[`litert-community/gemma-4-E2B-it-litert-lm`](https://huggingface.co/litert-community/gemma-4-E2B-it-litert-lm)** (which is itself a LiteRT-LM port of **[`google/gemma-4-E2B-it`](https://huggingface.co/google/gemma-4-E2B-it)**) with Unsloth LoRA + a hand-curated SFT corpus of multi-turn care dialogues. The model is wired as a **router**, not a free agent loop β it picks from twelve tools (`identify_face`, `tell_me_about`, `whos_with_me`, `where_am_i`, `check_meds`, `log_dose_taken`, `create_reminder`, `make_note`, `get_help`, etc.). Pre-routers on the Flutter side catch distress signals and face-recognition intents deterministically before the model sees the turn.
|
| 54 |
|
| 55 |
**Training**
|
| 56 |
+
- **Base:** Gemma 4 E2B (instruction-tuned)
|
| 57 |
- **Method:** Unsloth LoRA β all-linear, r=16, Ξ±=32 β then merged into the base for export
|
| 58 |
- **Corpus:** 3,198 hand-curated turns across 19 waves, generated by ~9 Flutter instances running in parallel on an M4 MacBook (Claude played the patient, Gemma played the companion), LLM-judged per batch
|
| 59 |
- **Doctrine:** **never quiz, just tell** β backed by Tom Kitwood's *Dementia Reconsidered* (1997) and the DAWN Method's guidance against recall-testing
|
|
|
|
| 96 |
512-dim embedding
|
| 97 |
β ObjectBox HNSW cosine search
|
| 98 |
PersonEntity match βββ graph lookup (relationship, recent memories, photos)
|
| 99 |
+
β prompt assembly + Gemma 4 call
|
| 100 |
+
Gemma 4 LiteRT (this repo β 5.1 GB)
|
| 101 |
β
|
| 102 |
warm sentence (TTS optional)
|
| 103 |
```
|
|
|
|
| 123 |
|
| 124 |
## License
|
| 125 |
|
| 126 |
+
MIT (this repo). Upstream licenses apply to the base models β see the [Gemma terms](https://ai.google.dev/gemma/terms) for the LLM base (Apache 2.0 on the `litert-community` mirror, Gemma terms on the Google original) and the [InsightFace license](https://github.com/deepinsight/insightface/blob/master/LICENSE) for the ArcFace backbone.
|
| 127 |
|
| 128 |
## Citation
|
| 129 |
|
|
|
|
| 133 |
author = {El Hajj, Amanie and El Hajj, Hadi},
|
| 134 |
year = {2026},
|
| 135 |
url = {https://zekra.live},
|
| 136 |
+
note = {Kaggle Gemma 4 Good Hackathon submission β Health \& Sciences track}
|
| 137 |
}
|
| 138 |
```
|
| 139 |
|