Inspiration

I named RACHIDA.AI after my mother, Rachida. That personal connection keeps the project focused on the person behind every question: a woman who deserves care, dignity, privacy, and clear information during pregnancy and motherhood.

Maternal-health information should not disappear when the internet is unreliable, a cloud subscription expires, or a clinic only has an ordinary laptop. These conversations are also deeply private.

RACHIDA.AI began with one question: Can we make useful maternal-health AI run completely offline under real African infrastructure constraints, while preventing generated text from becoming the sole authority for urgent safety decisions?

The name is a tribute to my mother, but the project is intended for mothers and pregnant women across Africa—especially in communities where connectivity, specialist access, transport, and computing resources may be limited.

What it does

RACHIDA.AI is an offline-first maternal-health information and safety prototype designed for pregnant women and community health workers.

Its local language model, RACHIDA Mini, provides understandable maternal-health information without sending conversations to a cloud service. For safety-critical situations, the application uses a separate deterministic engine with signed and versioned rules. Urgent actions always take priority, uncertain critical answers fail closed, and generated text cannot overwrite a verified action card.

The submitted model is a 2.03-billion-parameter Q4_K_M GGUF that runs through llama.cpp using only the CPU. It requires no GPU and remains usable without an internet connection after installation.

RACHIDA.AI is a research prototype, not a diagnostic system, medical device, prescription tool, or replacement for a qualified healthcare professional.

How we built it

We selected Qwen3-1.7B because its compact architecture, Apache 2.0 license, multilingual foundation, and llama.cpp compatibility made it suitable for low-resource, offline deployment.

We converted and evaluated GGUF candidates, compared Q4_K_M and Q5_K_M quantization, and tested them using the official ADTC profiler and audit container. The final artifact contains 2,031,739,904 parameters and is approximately 1.19 GiB.

The tensor weights remain unmodified from the quantized base model. RACHIDA-specific behavior is implemented in the GGUF chat template, which:

  • disables hidden thinking so the model produces a direct answer;
  • supplies a maternal-health system prompt when none is provided;
  • detects high-risk medication-dose, facility-contact, and role-override requests;
  • rewrites those requests into constrained, safety-oriented tasks.

The wider application is built with FastAPI, Python, Pydantic, HTML, CSS, and JavaScript. A signed clinical rules pack defines its questions, messages, and deterministic A1–A4 safety actions. Ed25519 signatures verify the pack at startup, SHA-256 manifests protect its files, and a hash-chained local audit log provides tamper evidence.

No patient records were used. Development examples and the current clinical pack are synthetic and clearly labelled.

Challenges we faced

The hardest challenge was not making a small model sound confident. It was improving maternal-health behavior without damaging general reasoning.

We trained and evaluated three source-grounded QLoRA adapters. Although they improved several urgent-answer cases, each regressed on general-reasoning holdouts. We rejected all three rather than promoting a model that looked safer on a narrow test while becoming weaker overall.

We also discovered that prompt formatting, thinking mode, CPU topology, compiler settings, and thread count could materially change results. This required testing inside the official CPU-only audit container on clean Ubuntu virtual machines instead of relying only on development-laptop measurements.

Finally, adversarial multi-turn testing showed why the language model cannot be the only safety layer. A compact model can still invent unsafe clinical details when a request bypasses its prompt-level controls. That finding directly reinforced our architecture: the model explains information, while deterministic verified rules own safety-critical actions.

Verified results

On the official CPU-only audit environment, the final model achieved:

  • 3.26 generated tokens/second on the matched e2 profile;
  • 4.10 generated tokens/second on the n2 comparison profile;
  • approximately 1,410 MB peak memory usage;
  • 0.76 normalized ARC-Easy accuracy across the official 50-sample evaluation;
  • successful operation with zero GPU layers;
  • full offline inference through llama.cpp.

The integrated product also passed 31/31 model-connected scenarios, including pregnancy-stage grounding, corrections, urgent symptoms, medication requests, misspellings, prompt injection, French escalation copy, and offline resource boundaries.

What we learned

We learned that on-device AI is a complete systems problem, not simply a model-size problem. Quantization, runtime configuration, prompt design, safety architecture, evaluation, and user experience must all be tested together.

We also learned that rejected experiments are valuable. Refusing to ship a fine-tune that regressed elsewhere was one of the most important decisions we made.

Most importantly, responsible healthcare AI requires an explicit boundary between what a language model may explain and what it must never decide alone.

What’s next

Before any real-world pilot, RACHIDA.AI will require independent clinician review, jurisdiction-specific referral pathways, ethics and privacy approval, blinded multilingual evaluation, and deployment testing on clean low-cost laptops.

Future work includes evaluation with African-language native speakers, local retrieval over approved medical guidance, co-design with community health workers and pregnant women, and independent clinical validation.

Built With

Share this project:

Updates

Submission history