-
-
Official llama.cpp CLI test — Qwen2.5-Coder-7B-Instruct running on a 2015 dual-core laptop, no GPU.
-
Official llama.cpp CLI test — Qwen2.5-Coder-7B-Instruct running on a 2015 dual-core laptop, no GPU.
-
Official llama.cpp CLI test — Qwen2.5-Coder-7B-Instruct running on a 2015 dual-core laptop, no GPU.
-
Official llama.cpp CLI test — Qwen2.5-Coder-7B-Instruct running on a 2015 dual-core laptop, no GPU.
-
Official llama.cpp CLI test — Qwen2.5-Coder-7B-Instruct running on a 2015 dual-core laptop, no GPU.
-
Official llama.cpp CLI test — Qwen2.5-Coder-7B-Instruct running on a 2015 dual-core laptop, no GPU.
-
Official llama.cpp CLI test — Qwen2.5-Coder-7B-Instruct running on a 2015 dual-core laptop, no GPU.
-
Official llama.cpp CLI test — Qwen2.5-Coder-7B-Instruct running on a 2015 dual-core laptop, no GPU.
-
Official llama.cpp CLI test — Qwen2.5-Coder-7B-Instruct running on a 2015 dual-core laptop, no GPU.
Inspiration
In Africa, learning to code is often an uphill battle: unstable internet, frequent power outages, and limited access to human mentors. Yet the demand for programming skills is exploding across the continent. Koda was born from a simple question: what if an intelligent code tutor could run entirely offline, on the hardware African students already have, with zero cloud dependency?
What it does
Koda is a Python programming tutor for African beginners, built to run 100% locally through a quantized LLM — no internet connection required. It can:
- Explain core concepts (variables, loops, functions, data structures)
- Debug Python code and identify syntax or logic errors
- Generate exercises tailored to the student's level
- Adapt its responses to the student's language
How we built it
We chose llama.cpp with GGUF-format models as our inference engine, as required by the challenge. After an exploration phase using LM Studio (which runs llama.cpp under the hood) for rapid prototyping, we tested several candidate models:
- Phi-4-mini-instruct (Q4_K_M, ~2.5 GB) — lightweight and fast, but limited code quality
- Qwen2.5-Coder-7B-Instruct (Q4_K_M, ~4.5 GB) — significantly stronger at code generation and debugging
We validated Qwen2.5-Coder-7B-Instruct through 20 representative beginner-level tests in French (concept explanations, syntax/logic error debugging, exercise generation), then extended testing in two directions: across 5 additional languages, and against a deliberately advanced algorithmic challenge, to map out exactly where the model's reliability holds and where it breaks down.
Multilingual results: English, Portuguese, and Arabic performed excellently on both concept explanation and debugging. Hausa produced correct fixed code but consistently failed to name the underlying error. Swahili was the weakest, with vague explanations and no working code example in the concept test.
Advanced reasoning results: we challenged the model with a buggy recursive binary search implementation containing a subtle logic error (inverted recursive branches causing non-converging recursion). The model produced a working corrected solution, but its diagnostic reasoning was unreliable: it invented a non-existent "integer overflow" issue (not applicable in Python), contradicted itself on a second claim, and never explicitly identified the actual bug — silently switching from recursion to an iterative loop instead. This "correct answer, wrong reasoning" pattern was never observed in our beginner-level test set.
Challenges we ran into
- Limited development hardware: our initial tests ran on an aging laptop (2015 Intel i5 CPU, DDR3 RAM, HDD storage, no dedicated GPU) — a deliberately representative scenario of the hardware many African students actually have access to.
- CPU thread configuration: a poor default setting (only 1 thread allocated) drastically slowed generation; adjusting to 4 threads dramatically cut response time.
- Performance degradation over long sessions: response times spiked up to 40x slower during extended testing, later traced to thermal/memory accumulation rather than a model issue — resolved by a simple restart.
- Uneven multilingual coverage: Swahili and Hausa, despite being spoken by well over 150 million people combined across Africa, are clearly underrepresented in the base model's training data.
- Reasoning reliability degrades with complexity: while near-perfect on beginner-level tasks, the model's diagnostic explanations become unreliable on advanced algorithmic problems, even when the final code output is correct.
Accomplishments that we're proud of
- Getting a 7B-parameter coding model to run reliably, with no crashes, on decade-old consumer hardware far below typical spec sheets.
- Achieving 19/20 correct, hallucination-free responses across a diverse French-language beginner test set.
- Rigorously stress-testing Koda's limits — across languages and difficulty levels — rather than assuming broad capability, and using those findings to define a defensible, evidence-based product scope.
What we learned
- Model size isn't reliably correlated with inference speed on CPU — hardware configuration often matters more than the model choice itself.
- A code-specialized model (Qwen2.5-Coder) clearly outperforms a lightweight generalist model (Phi-4-mini) for this use case, even at 4-bit quantization.
- Multilingual "support" varies drastically by language even within a single model.
- A model can produce a correct code fix while reasoning incorrectly about why the original code failed — this gap widens with task complexity, which is why Koda's scope is deliberately limited to beginner-to-intermediate Python, where we've demonstrated reliable performance. ## What's next for Koda
- Add few-shot prompting to the system prompt to strengthen response consistency and multilingual error diagnosis
- Finalize command-line integration with llama.cpp, in line with the ADTC evaluation pipeline requirements
- Explore fine-tuning or larger models to improve Swahili and Hausa reliability
- Build automated regression testing so future model or prompt changes can be validated against our existing test set, rather than relying on manual verification
- Investigate lightweight guardrails to catch cases where the model's explanation contradicts its own corrected code, reducing the "correct answer, wrong reasoning" risk observed on advanced tasks
- Expand test coverage beyond Python to validate feasibility for other languages in the curriculum (e.g. JavaScript, C)
Log in or sign up for Devpost to join the conversation.