Model Card: Crop Diagnosis Reasoning — Llama 3.3 70B LoRA
Model Details
Model Description
This is a LoRA adapter fine-tuned on top of Llama-3.3-70B-Instruct to
perform differential diagnosis of crop health conditions. Given a field
report describing a symptom that is genuinely shared by several real,
confusable causes (e.g. yellowing leaves caused by nitrogen deficiency,
iron deficiency, sulfur deficiency, or viral mosaic infection), the model
identifies the correct diagnosis, names the plausible alternatives it
ruled out, and states the specific piece of evidence in the report that
distinguishes the true cause from its look-alikes — the same reasoning
process a plant pathologist walks through, made explicit and structured.
This is a differential-diagnosis task, not a simple extraction task: the
correct answer is not always the most-mentioned or most "famous" condition
for a given symptom, so the model must weigh the specific distinguishing
detail present in the text rather than pattern-match to a common label.
Training labels were generated by construction: each row is built from one
of eight confusable-condition clusters (see Training Data below), so the
correct diagnosis, the ruled-out alternatives, and the distinguishing
evidence are all guaranteed consistent with each other and with the
underlying agronomic logic, rather than separately annotated.
Submitted to the AutoScientist Challenge (Agriculture track) by
Adaption Labs.
- Developed by: Grold Otieno Mboya
- Shared by: Grold Otieno Mboya
- Model type: LoRA adapter for causal language modeling (agricultural
differential diagnosis reasoning)
- Language(s): English
- License: Llama 3.3 Community License Agreement (inherited from the
base model — see https://www.llama.com/llama3_3/license/)
- Finetuned from model:
meta-llama/Llama-3.3-70B-Instruct
Model Sources
Uses
Direct Use
Diagnosing crop symptoms that look alike but have different underlying
causes: nutrient deficiencies that resemble each other or resemble viral
infection, wilt diseases that share a common surface symptom but have
different pathogens/mechanisms, seedling damping-off caused by different
soil pathogens, and fruit lesions that are physiological versus
pathogen-caused. Each output names the primary diagnosis, the alternatives
considered and ruled out, the specific distinguishing evidence, and a
recommended confirmatory action where applicable.
Downstream Use
Could be extended with additional confusable-condition clusters (more
crops, more diagnoses per cluster, region-specific conditions) as a
starting point for a broader agricultural differential-diagnosis tool, or
integrated into an extension-officer or farmer-advisory interface.
Out-of-Scope Use
Not intended as a substitute for a licensed agronomist or plant
pathologist, and not validated for real-world field deployment. Not
evaluated for general capability, factuality, or safety beyond the
Agriculture task category described here. The model is only trained to
reason over the eight confusable-condition clusters described below;
diagnoses outside those clusters, or reports lacking any clear
distinguishing evidence, are out of scope and likely to produce unreliable
output.
Bias, Risks, and Limitations
The training data is synthetic and procedurally generated from eight
hand-built confusable-condition clusters (22 total diagnoses across 10
crops), with causal relationships informed by general, published
agronomic/plant-pathology knowledge rather than scraped from any specific
copyrighted source. This keeps the dataset freely redistributable but
means real-world phrasing, symptom presentation, and edge cases will be
more varied than the training distribution.
Known coverage limitation: the model has only been trained to
differentiate within these eight specific symptom clusters. A field report
describing a condition or symptom combination outside these clusters has
no guarantee of correct handling.
Known validation gap: at the time of this submission, this model's
performance has only been measured against Adaption Labs' own evaluation
sets (this dataset's held-out split, and their internal Agriculture
category benchmark) — see Results below. It has not yet been independently
tested against real-world, non-synthetic field reports. We view this as
the immediate next validation step beyond this submission.
Evidence-dependence: because the task is built around explicit
distinguishing evidence in the input text, the model's reliability depends
on that evidence actually being present and clearly stated. Ambiguous
reports lacking a clear distinguishing clue may still produce a confident
answer that is not well-supported by the input.
Recommendations
Users should treat outputs as a decision-support aid, not a confirmed
diagnosis, and should follow up with the recommended confirmatory action
(soil test, lab culture, etc.) where one is given before acting on the
result.
How to Get Started with the Model
1from transformers import AutoModelForCausalLM, AutoTokenizer
2from peft import PeftModel
3
4base_model_id = "meta-llama/Llama-3.3-70B-Instruct"
5adapter_id = "Gro97/crop-diagnosis-reasoning-llama3-3-70b-lora"
6
7tokenizer = AutoTokenizer.from_pretrained(base_model_id)
8base_model = AutoModelForCausalLM.from_pretrained(base_model_id, device_map="auto")
9model = PeftModel.from_pretrained(base_model, adapter_id)
10
11system_prompt = (
12 "You are an expert plant pathologist performing differential diagnosis. "
13 "Given a field report describing symptoms, determine the most likely diagnosis, "
14 "identify plausible alternative diagnoses that share similar surface-level symptoms "
15 "but are ruled out by specific evidence in the report, and state that distinguishing "
16 "evidence explicitly. Respond only with strict JSON with exactly these keys: "
17 "primary_diagnosis, host_crop, ambiguous_symptom, ruled_out_alternatives (list), "
18 "distinguishing_evidence, confirmatory_action. Use null where not applicable."
19)
20user_prompt = (
21 "A field report on maize in the lower field near the river described yellowing "
22 "of the leaves during the early rainy season. Closer inspection showed the "
23 "yellowing appeared on the youngest leaves first, with the veins remaining "
24 "distinctly green."
25)
26
27messages = [
28 {"role": "system", "content": system_prompt},
29 {"role": "user", "content": user_prompt},
30]
31inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
32output = model.generate(inputs, max_new_tokens=400)
33print(tokenizer.decode(output[0], skip_special_tokens=True))
Training Details
Training Data
Custom-built dataset crop_diagnosis_reasoning: 3,200 rows across
eight confusable-condition clusters (22 total diagnoses, 10 crops):
| Diagnosis | Share |
|---|
| Viral mosaic infection | 7.3% |
| Potassium deficiency | 6.9% |
| Poor rhizobial nodulation (inoculation failure) | 6.5% |
| Magnesium deficiency | 6.5% |
| Anthracnose fruit rot | 6.3% |
| Blossom-end rot (calcium deficiency / water stress) | 6.2% |
| Soil nitrogen deficiency unrelated to nodulation | 6.0% |
| Septoria leaf spot | 4.8% |
| Rhizoctonia damping-off | 4.6% |
| Zinc deficiency | 4.1% |
| Fusarium root rot | 4.0% |
| Pythium damping-off | 4.0% |
| Bacterial spot | 3.9% |
| Herbicide drift injury | 3.7% |
| Early blight (Alternaria solani) | 3.6% |
| Nitrogen deficiency | 3.5% |
| Root-knot nematode damage | 3.3% |
| Verticillium wilt | 3.3% |
| Sulfur deficiency | 3.2% |
| Bacterial wilt (Ralstonia solanacearum) | 2.9% |
| Fusarium wilt | 2.8% |
| Iron deficiency (chlorosis) | 2.7% |
Each row is generated from a templated combinatorial construction:
a cluster is chosen, one candidate within it is selected as ground truth,
and the field-report text is built from the cluster's shared ambiguous
symptom plus that candidate's specific distinguishing clue, with randomized
location and timing phrasing for lexical diversity. The other candidates in
the same cluster become the ruled_out_alternatives label. Full generator
script is in the dataset repository.
Training Procedure
Fine-tuned via Adaption Labs' AutoScientist platform using LoRA.
Training Hyperparameters
- Training regime: see
adapter_config.json in this repository for
the exact LoRA rank/alpha/target-module configuration used for this run.
Speeds, Sizes, Times
Not independently benchmarked by the author; training was run on Adaption
Labs' hosted infrastructure (specific hardware not disclosed to the end
user for this run).
Evaluation
Testing Data, Factors & Metrics
Testing Data
Two evaluation sets, as reported by Adaption Labs' AutoScientist platform:
(1) a held-out split of this project's own dataset, (2) a broader set of
unseen tasks from Adaption's internal Agriculture category benchmark.
Metrics
Pairwise preference win rate against the un-adapted base model, as reported
by Adaption Labs' AutoScientist platform (judge methodology not disclosed
to the end user).
Results
| Evaluation set | Base model win rate | Adapted model win rate |
|---|
| This dataset's held-out samples | 19% | 81% |
| Broader Agriculture category | 17% | 84% |
Summary
The adapter shows a large improvement over the base model both on its own
training distribution (81% win rate) and on the broader Agriculture
category benchmark (84% win rate) — the two numbers are close, suggesting
the gains generalize reasonably well beyond the specific training
distribution, unlike cases where own-dataset performance substantially
outpaces category-wide performance. As noted in Limitations, this has not
yet been supplemented with testing against independently-sourced,
non-synthetic field reports.
Environmental Impact
- Hardware Type: Not disclosed by the training platform for this run.
- Hours used: Not disclosed.
- Cloud Provider: Adaption Labs' hosted infrastructure.
- Compute Region: Not disclosed.
- Carbon Emitted: Not calculated.
Technical Specifications
Model Architecture and Objective
LoRA adapter applied to meta-llama/Llama-3.3-70B-Instruct, trained via
supervised fine-tuning to perform differential diagnosis reasoning over
confusable crop health conditions.
Compute Infrastructure
Software
- PEFT 0.15.1
- Trained via Adaption Labs' AutoScientist platform
Citation
BibTeX:
1@misc{mboya2026cropdiagnosis,
2 author = {Mboya, Grold Otieno},
3 title = {Crop Diagnosis Reasoning: A LoRA Adapter for Agricultural
4 Differential Diagnosis},
5 year = {2026},
6 howpublished = {AutoScientist Challenge submission, Adaption Labs},
7 url = {https://huggingface.co/Gro97/crop-diagnosis-reasoning-llama3-3-70b-lora}
8}
Model Card Contact
See author's Hugging Face profile:
https://huggingface.co/Gro97
Framework versions