Downloads · 30 days
6
18% of all-time downloads
Gro97/crop-diagnosis-reasoning-llama3-3-70b-lora
crop-diagnosis-reasoning-llama3-3-70b-lora is a machine learning model from Gro97. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as apache-2.0.
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, confu…
Downloads · 30 days
6
18% of all-time downloads
All-time downloads
34
Public
Repo size
3.3 GB
Likes
0
Public
Click a slice to open those files.
.safetensors3.3 GB · 99%
From the Hugging Face model README
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.
meta-llama/Llama-3.3-70B-Instruct| Platform | Dataset | Model |
|---|---|---|
| Hugging Face | adaption-crop-diagnosis-reasoning | crop-diagnosis-reasoning-llama3-3-70b-lora |
| Kaggle | adaption-crop-diagnosis-reasoning | crop-diagnosis-reasoning-llama3-3-70b-lora |
Live Demo: fieldpatho.adaptionlabs.app
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.
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.
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.
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.
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.
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model_id = "meta-llama/Llama-3.3-70B-Instruct"
adapter_id = "Gro97/crop-diagnosis-reasoning-llama3-3-70b-lora"
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
base_model = AutoModelForCausalLM.from_pretrained(base_model_id, device_map="auto")
model = PeftModel.from_pretrained(base_model, adapter_id)
system_prompt = (
"You are an expert plant pathologist performing differential diagnosis. "
"Given a field report describing symptoms, determine the most likely diagnosis, "
"identify plausible alternative diagnoses that share similar surface-level symptoms "
"but are ruled out by specific evidence in the report, and state that distinguishing "
"evidence explicitly. Respond only with strict JSON with exactly these keys: "
"primary_diagnosis, host_crop, ambiguous_symptom, ruled_out_alternatives (list), "
"distinguishing_evidence, confirmatory_action. Use null where not applicable."
)
user_prompt = (
"A field report on maize in the lower field near the river described yellowing "
"of the leaves during the early rainy season. Closer inspection showed the "
"yellowing appeared on the youngest leaves first, with the veins remaining "
"distinctly green."
)
messages = [
{"role": "system", "content": system_prompt},
{"role": "user", "content": user_prompt},
]
inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
output = model.generate(inputs, max_new_tokens=400)
print(tokenizer.decode(output[0], skip_special_tokens=True))
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.
Fine-tuned via Adaption Labs' AutoScientist platform using LoRA.
adapter_config.json in this repository for
the exact LoRA rank/alpha/target-module configuration used for this run.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).
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.
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).
| Evaluation set | Base model win rate | Adapted model win rate |
|---|---|---|
| This dataset's held-out samples | 19% | 81% |
| Broader Agriculture category | 17% | 84% |
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.
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.
BibTeX:
@misc{mboya2026cropdiagnosis,
author = {Mboya, Grold Otieno},
title = {Crop Diagnosis Reasoning: A LoRA Adapter for Agricultural
Differential Diagnosis},
year = {2026},
howpublished = {AutoScientist Challenge submission, Adaption Labs},
url = {https://huggingface.co/Gro97/crop-diagnosis-reasoning-llama3-3-70b-lora}
}
See author's Hugging Face profile: https://huggingface.co/Gro97