Inspiration

The biggest bottleneck for AI in Africa is not capability—it is access.

Cloud AI assumes reliable internet, API budgets, electricity, and relatively powerful hardware. These assumptions do not always hold for students, developers, small businesses, and organizations across Africa.

The Africa Deep Tech Challenge's focus on the 8 GB, no-GPU, $150–$500 laptop gave us the right constraint: instead of building for expensive hardware, we asked, "What if a capable AI coding assistant could run on the laptop already on your desk?"

We chose coding because the ability to write, debug, and learn programming locally can make a significant difference when cloud access is unavailable or too expensive.

What it does

Sabi AI is a fully offline coding assistant that provides:

Code generation Code debugging Programming tutoring Code explanations Yorùbá programming assistance

At its core is sabi-v1, which runs entirely on-device with no cloud inference or API keys required.

With sabi-Yorùbá-LLM, users can interact with the coding assistant in Yorùbá. It can explain code, errors, programming concepts, and solutions in Yorùbá, making programming more accessible to people who prefer learning in their native language.

Sabi AI is available through three interfaces:

Terminal chat Full-screen TUI with live token and RAM monitoring Browser-based web application with token-by-token streaming

How we built it

Our design philosophy is "thin model, smart harness."

We use Qwen2.5-Coder-3B, Q4_K_M quantized, keeping the model small enough to run on an 8 GB, CPU-only machine.

Inference runs locally through llama.cpp with n_gpu_layers=0. CPU threads are automatically tuned to the machine's available physical cores. Instead of putting every capability into the model, lightweight Python handles the surrounding intelligence: routing, permissions, memory, RAG, streaming, telemetry, and safety controls. We also implemented structured JSON generation and an incremental JSON decoder so responses can be safely parsed while still being streamed to the user.

Challenges we ran into

Reliable structured output

The 3B model initially struggled to consistently follow our response format. Lowering the temperature was not enough, so we introduced llama.cpp's JSON grammar mode to structurally enforce valid output.

Safety During development, a simple "hello" reached the wrong agent loop and caused an unintended file change in our repository. We traced the issue to a stale prompt and missing routing guard. We introduced a dedicated small-talk router, restricted the serving mode to a filesystem-isolated Coding Assistant, and added regression tests.

Model verification The official ADTC profiler exposed a mistake in our own Hugging Face upload: the uploaded model was an outdated 7B build rather than the 3B model used in our benchmarks. We corrected the model source and re-ran the measurements rather than relying on the original numbers.

Streaming JSON output improves reliability but makes live streaming difficult. We built an incremental decoder that identifies the answer content and streams it as it is generated while still validating the complete response.

Accomplishments that we're proud of

We are proud that Sabi AI demonstrates that useful AI coding assistance does not require a GPU, cloud infrastructure, or expensive hardware. We successfully built a system that: Runs completely offline Runs on CPU-only hardware Fits within the constraints of an 8 GB laptop Generates and debugs code locally Provides programming tutoring Explains programming concepts in Yorùbá Streams responses in real time Includes safety and routing controls Uses measurable performance and memory constraints Most importantly, we built for a realistic African hardware constraint, rather than assuming access to high-end machines.

What we learned

Our biggest lesson is that "thin model, smart harness" is more than a slogan. When memory and compute are limited, making the model bigger is not always the answer. Careful engineering around the model—routing, streaming, structured output, safety, memory management, and measurement—can significantly improve the overall system. We also learned to distrust our own measurements until they are independently verified. The profiler and repeated benchmarks helped us catch mistakes that would otherwise have become incorrect claims. Finally, we learned that African-language AI should go beyond translation. With sabi-Yorùbá-LLM, Yorùbá becomes a language for learning and understanding programming itself.

What's next for Sabi AI

The next phase of Sabi AI is focused on making coding assistance multimodal and voice-enabled. We are training Sabi with approximately 140 hours of Yorùbá and Ibibio data to support natural language interaction. The goal is for users to speak to Sabi, ask coding questions, receive explanations, and interact with the assistant entirely through voice, using local STT (Speech-to-Text) and TTS (Text-to-Speech) models. We are also working toward supporting more African languages, bringing offline, multilingual, and voice-enabled AI coding assistance to developers and learners across Africa.

Built With

Share this project:

Updates

Submission history