Logo Lanfrica
  • Home
  • Atlas
  • Insights
  • Docs
  • Sign in

© 2026 Lanfrica. All rights reserved. All copyrights of the resources shown on the Lanfrica website belong to the original copyright holders, unless explicitly stated otherwise.

nmrenyi/mamai

Domain:

healthcare

Record type:

software
Creator:
nmr
Host:
On-device medical search for nurses and midwives in Zanzibar — offline RAG with Gemma 4 on Android # MAM-AI On-device medical search for nurses and midwives in Zanzibar Demo video · Live web demo · Eval Report · Latency Report --- Android app that answers clinical questions offline using on-device RAG — Gemma 4 E4B (LiteRT-LM) for generation, EmbeddingGemma-300M for embeddings, SQLite for vector search. English only. No internet needed after the initial ~3.8 GB model download. **🏥 Try the live web demo** — a faithful, browser-based mirror of the on-device app (same Gemma 4 + G1 prompt + EmbeddingGemma RAG, served via llama.cpp). Demonstration only — not medical advice; don't read latency from it. (demo source) ## Architecture ``` ┌─────────────────────────────────────────────────┐ │ Flutter UI (Dart) │ │ intro_page.dart · search_page.dart │ ├──────────────┬──────────────────────────────────┤ │ MethodChannel│ EventChannel (streaming) │ ├──────────────┴──────────────────────────────────┤ │ Android Native (Kotlin) │ │ MainActivity.kt · RagStream.kt │ │ ┌────────────────────────────────────────────┐ │ │ │ RagPipeline.kt │ │ │ │ ┌──────────┐ ┌──────────┐ ┌────────────┐ │ │ │ │ │ Gemma 4 │ │ Embedding│ │ SQLite │ │ │ │ │ │ LiteRT-LM│ │ Gemma │ │ VectorStore│ │ │ │ │ └──────────┘ └──────────┘ └────────────┘ │ │ │ └────────────────────────────────────────────┘ │ └─────────────────────────────────────────────────┘ ``` Query → EmbeddingGemma embeds → SQLite retrieves top-3 guideline chunks → prompt assembled → LiteRT-LM streams response → Flutter renders markdown. ## Build & Run Requires a real Android device (LiteRT-LM needs hardware acceleration, not emulators). ```bash cd app flutter pub get flutter run # debug on connected device flutter build apk # release APK adb logcat -s mam-ai # timing, memory, inference logs ``` ## Install MAM-AI ships as a signed Android APK (it is **not** on …

Visit

github.com

Languages

Swahili, Coastal

Licenses

Apache-2.0

Similar

nmrenyi/mamai-report

nmrenyi/mamai-report

Technical reports for MAM-AI — an on-device medical RAG system for nurses and midwives in Zanzibar.