REPORT.md — Livestock Farm Assistant
- Problem
Livestock farmers across much of Africa manage animal health, feeding, breeding, and housing decisions with limited access to veterinary expertise, unreliable internet connectivity, and no budget for cloud-based AI tools. A dairy farmer in a rural area may go days without stable connectivity, yet still needs fast, practical guidance on questions like "is this cow showing signs of illness?" or "what should I feed my goats before kidding season?"
Target user: A small-to-medium livestock farmer or extension officer working from a low-cost laptop (the ADTC Standard Laptop profile: 8 GB RAM, integrated graphics, no discrete GPU), often with no reliable internet after initial setup.
The Livestock Farm Assistant addresses this by pairing a local LLM advisor with a simple animal registry and farm log, so guidance is grounded in the farmer's actual animals and history — entirely offline, with zero recurring cost and zero dependency on connectivity.
- Design Decisions
Model: Llama-3.2-3B-Instruct, quantized to GGUF Q4_K_M (bartowski build). A 3B model was chosen over larger alternatives (e.g. Qwen2.5-7B) specifically because the ADTC efficiency score (S_eff) rewards lower RAM utilization, and our target hardware has only 8 GB total RAM to share between the OS, the app's UI (Flet), and inference. A 7B model would leave dangerously little headroom.
Runtime: Originally built against Ollama during early development for convenience (fast local iteration, simple HTTP API). For ADTC compliance — which requires llama.cpp directly, with no other runtime accepted — the app was migrated to llama-cpp-python, loading the same GGUF weight file directly via Llama() rather than proxying through a separate Ollama server process. This also removes a moving part (no need to keep ollama serve running in a second terminal) and matches exactly what the ADTC profiler benchmarks.
Quantization level: Q4_K_M was chosen as the standard balance point between output quality and memory footprint for 3B-class models on CPU-only inference. Q5/Q6 variants were considered but not tested in this cycle; Q4_K_M's ~1.87 GiB footprint left comfortable headroom under the 7 GB efficiency budget.
Context window: Configured at 2048 tokens (n_ctx=2048). This keeps memory overhead predictable and is sufficient for the farm-log context injection pattern used by the Advisor tab (recent log entries
animal registry + the current question), without needing a larger window that would only inflate memory usage for a use case that rarely requires long-context reasoning.
- Constraints
Hardware: Tested on an Intel Core i5-7200U (2 cores / 4 logical threads, 2.50 GHz base), a 2017-era ultrabook CPU with no discrete GPU — representative of the older, budget hardware the ADTC challenge specifically targets, rather than a high-end development machine. RAM: 8 GB total system RAM, shared with the OS and the Flet desktop UI process. Connectivity: The app must run with zero network calls during inference. Model weights are fetched once during setup (download_model.sh) and never re-fetched at runtime. Power: Target users may be running on battery or intermittent power in rural settings — informing the choice of a smaller, lower-thermal-load 3B model over a larger one.
- Benchmarks
Measured locally via llama-bench and the ADTC profiler (adtc-profiler run --mode participant --skip-accuracy) on the i5-7200U reference machine described above.
llama-bench (standalone, 4 threads — matches hardware thread ceiling)
TestResult (t/s)pp51220.53 ± 0.46tg1286.34 ± 0.14
ADTC profiler (submission.json, participant mode)
MetricValueTokens/sec (generation)5.62First token latency33,237.95 msPeak RSS (RAM)3,367.7 MBSteady-state RSS (RAM)2,783.6 MBCPU utilization (p99)94.4%Thermal throttledfalseParams match metadata claimtrue
The gap between the standalone llama-bench result (6.34 t/s) and the profiler's measured throughput (5.62 t/s) is attributed to the additional overhead of the full application context — the profiler exercises the actual submission pipeline rather than a bare llama-bench invocation, including model loading through the app's own configuration path.
Projected leaderboard components (accuracy omitted; not scored in participant self-check mode):
S_perf = min(5.62 / 15.0, 1.0) × 100 ≈ 37.5 S_eff = max(0, (7.0 − 3.368) / 7.0) × 100 ≈ 51.9 P_thermal = 0 (no throttling observed)
No out-of-memory errors or thermal throttling occurred during any benchmark run, indicating the model comfortably fits the ADTC Standard Laptop's 8 GB RAM / integrated-graphics-only profile with room to spare.
- Notes on Limitations
The Advisor is explicitly designed to defer to a real veterinarian for anything urgent or serious — this is enforced both in the system prompt and reinforced with an always-visible disclaimer in the UI. A 3B model, however capable at structuring farm-management thinking, is not a substitute for breed-specific expert knowledge or clinical diagnosis, and the app is built around that boundary rather than around it.
Log in or sign up for Devpost to join the conversation.