Inspiration
In much of Sub-Saharan Africa, the most dangerous moments in a pregnancy happen in the gaps between clinic visits — where there is no doctor on hand, and where the cost of running modern AI is simply out of reach. The intelligence that could help a woman in those moments is locked behind recurring cloud API fees that health systems in the region cannot sustain at scale.
We had already built NURA, a maternal-health platform that supports pregnant women and the community health workers and clinicians around them. Its intelligence, however, ran on expensive cloud models. NURA Edge is our answer to a simple question: could we run the full NURA system on far cheaper infrastructure, at a fraction of the cost, so it can actually reach the women who need it?
What NURA Edge is
NURA Edge is the complete NURA platform, re-engineered so its intelligence runs on a small, quantized model instead of an expensive cloud LLM. That change removes the per-token API fees and lets the whole system be hosted and managed on much cheaper infrastructure — the real goal of this work.
NURA Edge includes the full feature set of NURA:
- Maternal danger-sign triage for both the pregnant woman (asking directly) and the community health worker (asking on her behalf)
- Automatic emergency escalation — when a patient is flagged as needing urgent care, NURA can trigger an emergency call to the hospital and provide GPS coordinates so help can reach her
- Clinician takeover — a doctor can step in and take over from the AI whenever needed
- Antenatal reminders, personalized daily health tips, and wellness check-ins
- Patient onboarding with a clinical risk rubric, and a full patient record
For this hackathon, we demonstrate the functionalities that directly involve the language model — triage, tips, check-ins, and the patient journey — because those are what the challenge evaluates. The other capabilities (GPS provision, automated hospital emergency calls, clinician takeover, antenatal reminders) are part of NURA Edge as well; they simply sit outside what the model-focused evaluation measures.
Why it is offline here
For this challenge, NURA Edge runs fully offline so the judges can verify the model in a sandbox with no external calls. But offline operation is not the point — it is the proof. Being able to run the model on a small, CPU-only machine with no cloud dependency is exactly what demonstrates that NURA's intelligence can be hosted cheaply and managed at low cost, which is the barrier that has kept AI out of frontline African maternal care.
How we built it
- Base model: Qwen2.5-1.5B-Instruct (Apache-2.0) — permissive license, small footprint, multilingual strength for Francophone Africa.
- Quantization: compressed to Q4_K_M GGUF with llama.cpp — from ~3.1 GB down to 945 MB, small enough to run on inexpensive hardware.
- Offline RAG: because a 1.5B model has weak factual recall, a local sentence-embedding model (all-MiniLM-L6-v2) with FAISS retrieval grounds every answer in a clinician-approved corpus covering pregnancy and postpartum danger signs, bleeding and miscarriage, malaria, anaemia, obstructed labour, and newborn sepsis — leading regional causes of maternal and newborn death.
- Safety by construction: danger-sign escalation, "never confirm a loss," and "never prescribe" are enforced in the prompt and in code, not left to the model.
What we learned
- Small models need grounding, not trust. RAG turned an unreliable 1.5B model into a safe one by tying every answer to vetted guidance.
- Enforce safety in code, not prompts. A small model does not reliably obey "never do X"; clinically critical rules have to be deterministic.
- Affordability is the real barrier. Shrinking the model until it runs on cheap infrastructure is what makes the whole platform sustainable for African health systems.
Challenges we faced
- Balancing a rich retrieval context against a tight memory budget.
- Reliably capturing model output across different llama.cpp builds and environments.
- Distilling a full cloud platform down to affordable, low-cost infrastructure without losing any of its features or safety guarantees.
Results
Measured with the official ADTC profiler in a memory-constrained container matching the target hardware:
- Peak RAM: ~1.1 GB — far under the 7 GB ceiling
- Throughput: 26 tokens/sec on native CPU
- Model size: 945 MB
- No thermal throttling
NURA Edge is not a demo. It is the full NURA platform, made affordable enough to run where it is needed most.
Built With
- cpu-inference
- digital-health
- docker
- edge-ai
- faiss
- gguf
- healthcare
- hugging-face
- llama.cpp
- lm-eval
- maternal-health
- natural-language-processing
- offline-ai
- python
- quantization
- qwen
- rag
- retrieval-augmented-generation
- sentence-transformers
- sqlite
