Inspiration
University and bootcamp students across Africa learn to program on low-end laptops with expensive, unreliable internet. Cloud tutors (Copilot, ChatGPT) are blocked by subscription cost and connectivity. When a student in Luanda or Nairobi hits an IndexError at 11 pm with no data bundle, they are stuck. I built Mwalimu Code ("mwalimu" = teacher in Swahili) so the tutor lives on the laptop.
What it does
Mwalimu Code is a fully offline programming tutor: it explains error messages, reviews exercises, teaches concepts and generates practice problems — in English and Portuguese, for lusophone Africa. It is tuned to teach, not just solve: answers explain why the code fails, show a minimal example, and flag common student mistakes.
How we built it
- Model: Qwen2.5-Coder-1.5B-Instruct, GGUF Q4_K_M (~1 GB) — coder-specialized small models beat generalist peers at code explanation, and 1.5B leaves huge RAM headroom on the 8 GB profile.
- Runtime: llama.cpp (CPU-only). The same
llama-serverbinary serves an OpenAI-compatible API and the zero-dependency web UI (vanilla HTML/CSS/JS, streaming with a live tok/s meter). - Validation: benchmarked with the official ADTC profiler in participant mode, using a SIMD-disabled llama.cpp build that replicates the audit sandbox.
Challenges
Making a 1.5B model feel like a tutor (system-prompt pedagogy engineering), keeping the whole stack offline and dependency-free, and honest benchmarking on below-profile hardware (i5-7300U, 2 cores) with sandbox-parity builds.
Accomplishments
Peak RAM of 1.1 GB — 16% of the 7 GB budget (Seff ≈ 84.6) with zero OOM risk; a real bilingual product, not just a model; fully reproducible setup (download_model.sh + run_tutor.sh).
What we learned
Small coder models + careful pedagogy prompting outperform bigger generalist models for tutoring; sandbox-parity measurement avoids nasty surprises at audit time.
What's next
LoRA fine-tuning on African university exercises, more languages (French, Swahili), and packaged distribution for student laptops.
Built With
- bash
- css3
- gguf
- html5
- javascript
- llama.cpp
- playwright
- python
- qwen
Log in or sign up for Devpost to join the conversation.