Inspiration
Agriculture employs over 60% of Africa's workforce, but farmers and extension officers have no access to AI-powered advisory tools — the ones that exist require stable internet and API subscriptions. We asked: what if the farm advisor could sit on the same laptop already sitting on the desk at the local agricultural office? The Africa Deep Tech Challenge named the exact problem we'd been thinking about, commodity hardware, no cloud, real African use cases. That was the spark.
What it does
Agripadi is a fully offline, on-device farm advisor powered by a 3.35-billion-parameter language model (Cohere Aya). It answers questions about crops, pests, soil, irrigation, and planting schedules, in English, Nigerian Pidgin, or Hausa, matching whatever language the user writes in. It runs entirely on Ubuntu laptops with no internet connection, no API keys, and no data leaving the machine. The app also includes a Pest Vision camera panel for future on-device image-based crop disease detection, via a custom finetuned EfficientNet CNN
How we built it
- Model: Trained Cohere Aya 3.35B via QLora on a custom snthetic dataset covering relevant african facts and use cases, and then , quantized to Q4_K_M (~2 GB GGUF) for efficient CPU inference
- Runtime: llamadart (Flutter FFI bindings to llama.cpp, native build b10514) — chosen over cloud SDKs because it keeps everything on-device
- Frontend: Flutter (Linux desktop) with a clean left-sidebar, top-bar, and chat-column layout
- Template engine: Custom Aya/Command-R chat template patch — the original llamadart library didn't support Cohere's chat format, so we patched the handler to inject
<BOS_TOKEN>and detect the Aya chat format block at runtime - Custom system prompt: Multilingual-aware, instructs the model to detect and reply in the user's language
- Tested on: Intel i5-6300U, 7.6 GB RAM, Ubuntu — well below the ADTC Standard Laptop spec
Challenges we ran into
Model under-fit on the first few trail runs we fixed this by expanding the dataset and increasing the number of epochs
Building for commodity hardware the i5-6300U (2 cores, 4 threads) pushes decent tokens/second. Getting useful throughput on genuinely low-end hardware required hard choices about quantization depth.
Accomplishments that we're proud of
- It actually works on a $200 refurbished laptop — real coherent responses, not parlor tricks
- Multilingual out of the box — no fine-tuning, just a system prompt adjustment; the Aya model's training handles the rest
- Zero cloud dependency — the entire stack, model included, runs from disk with no network calls
- Debugged a native C++ inference library to root cause — isolated Vulkan vs CPU behavior through systematic testing with headless Dart scripts and direct llama-cpp-python calls against the same GGUF, same prompt, same tokenizer
What we learned
- The bottleneck for AI in Africa is not model availability — it's access economics. The models exist; the infrastructure to serve them doesn't. On-device inference solves this.
- Debugging FFI boundaries between Dart, Flutter, and native C++ (llama.cpp) requires treating each layer independently — we built headless test scripts at each boundary to isolate where corruption enters.
- Small quantized models (3–4B Q4) are genuinely useful for domain-specific advisory when paired with a strong system prompt — they don't need to be general-purpose.
What's next for Agripadi
- Android build — same Flutter codebase, targeting phones for farmers who don't have laptops
- PSSST compatibility — exploring integration with farmer-facing SMS/USSD interfaces for reach beyond the laptop
Built With
- cohere
- flutter
- llama.cpp
Log in or sign up for Devpost to join the conversation.