Inspiration

Sahelian agriculture often operates under constraints that mainstream AI products overlook: intermittent connectivity, expensive cloud access, and modest shared laptops. We wanted to build an agricultural expert for the hardware the Sahel actually has not a system that assumes a datacenter.

Sahel Sage was born from this idea: useful agricultural AI should still work when the internet does not.

What it does

Sahel Sage is an offline agricultural assistant for extension officers, cooperatives, and agro-pastoral communities. It provides guidance on livestock health, drought and pasture management, soil fertility, pests, storage, and weather- and market-timing decisions.

The advisory console grounds recommendations in a packaged library of 56 agricultural and livestock manuals, cites the source behind recommendations, and abstains when the available evidence is insufficient. Seven hazardous categories are rejected in code before the model runs.

How we built it

We fine-tuned a Qwen3-0.6B model with QLoRA, converted it to a 341 MB GGUF, and run it through llama.cpp entirely offline and CPU-only.

Our training corpus contains 56 public field manuals and 9,746 grounded training examples. The console uses FastAPI and SQLite FTS5 for local evidence retrieval.

We deliberately optimized for the competition's constrained environment: 4 CPU cores, 8 GB-class RAM, and no GPU. We discovered that on the SIMD-disabled evaluation environment, quantization format mattered enormously. Flattening the tied embeddings increased generation throughput by 47%, while keeping memory extremely low.

Challenges we ran into

The hardest problem was not making the model answer it was making it answer safely and honestly.

Our audit revealed that the 0.6B model could confidently invent agricultural facts and even produce dangerous quantities. Fine-tuning alone did not solve this. We therefore moved verified knowledge into the model's context, added calibrated abstention, and implemented seven safety prohibitions directly in code.

We also learned that standard benchmarks can hide real failures. Several of our worst bugs appeared only when testing the complete system.

Accomplishments we're proud of

We built a genuinely offline agricultural AI that fits comfortably within the target hardware constraints.

The shipped model is only 341 MB, while our development measurements showed roughly 484 MB peak RAM. We also achieved 368 passing tests, reproducible measurement procedures, source-traceable facts, and code-level safety enforcement.

Most importantly, we built the system around a principle we believe matters for real deployment: when the evidence is not there, Sahel Sage should say so.

What we learned

Our biggest lesson was that small models require better engineering, not simply more parameters.

Model size, quantization, prompting, evaluation methodology, evidence retrieval, and safety architecture all interacted in unexpected ways. We also learned that a model can perform well on conventional benchmarks while still failing badly in real-world scenarios.

For this project, reliability came from treating the model as one component of a carefully constrained system not as an all-knowing expert.

What's next for Sahel Sage

We want to expand Sahel Sage into a genuinely multilingual Sahelian agricultural assistant, starting with Wolof after native-speaker review.

Next steps include expanding the verified knowledge base, improving multilingual support, strengthening the offline console, and continuing to improve safety and abstention.

The long-term vision is simple: practical agricultural intelligence that remains available even when connectivity, compute, and cloud access are not.

Built With

  • agriculture
  • agritech
  • ai
  • artificial
  • edge
  • fastapi
  • gguf
  • intelligence
  • language
  • large
  • learning
  • llama.cpp
  • machine
  • models
  • natural
  • offline
  • on-device
  • processing
  • python
  • qwen
Share this project:

Updates

Submission history