Views
No views yet
The objective: adapt a frontier-scale language model from general-purpose intelligence toward practical agricultural reasoning.
meta-llama/Llama-3.3-70B-Instruct-ReferenceAgricultural AI should be able to communicate agricultural knowledge in the language of the person using it, not only the language in which the research was written.
| Domain | Share |
|---|---|
| Agriculture | 75% |
| Science | 8% |
| Animal & Nature | 4% |
1{
2 "job_id": "dd0c2472-0e0c-4eb7-a0f3-2d23711d68cd",
3 "training_experiment_id": "ef562e27-51a8-496f-8d2f-3fe55f65b2ac",
4 "original_model_name": "meta-llama/Llama-3.3-70B-Instruct-Reference",
5 "trained_model_name": "adaption_agronomy_qa_pairs",
6 "training_method": "sft",
7 "training_type": "lora",
8 "data_format": "chat",
9 "hyperparams": {
10 "lora": "true",
11 "lora_r": 64,
12 "n_evals": 5,
13 "n_epochs": 2,
14 "batch_size": "max",
15 "lora_alpha": 128,
16 "lora_dropout": 0,
17 "min_lr_ratio": 0.1,
18 "warmup_ratio": 0.05,
19 "weight_decay": 0.05,
20 "learning_rate": 0.0001,
21 "max_grad_norm": 1,
22 "base_model_size": "70B",
23 "train_on_inputs": "false",
24 "training_method": "sft",
25 "lr_scheduler_type": "cosine",
26 "scheduler_num_cycles": 0.5,
27 "lora_trainable_modules": "all-linear"
28 }
29}
30### Key Configuration
31
32| Parameter | Value |
33|---|---|
34| Base model | Llama 3.3 70B Instruct |
35| Training method | SFT |
36| Adaptation | LoRA |
37| LoRA rank | 64 |
38| LoRA alpha | 128 |
39| Epochs | 2 |
40| Learning rate | 1e-4 |
41| Weight decay | 0.05 |
42| Warmup ratio | 0.05 |
43| Scheduler | Cosine |
44| Trainable modules | All linear layers |
45| Evaluation runs | 5 |
46
47---
48
49## Evaluation Protocol
50
51The model was evaluated against the original Llama 3.3 70B Instruct model to measure whether agricultural fine-tuning produced a meaningful improvement over the general-purpose base model.
52
53Two evaluation settings were used:
54
551. **In-distribution evaluation:** A held-out test set was used to evaluate performance on agricultural examples related to the domain represented in the training data. This tests whether the model learned the target agricultural domain without simply evaluating on the examples it was trained on.
562. **Broader domain-specific evaluation:** A broader agricultural test set was used to examine whether the improvement generalised beyond the exact training examples.
57
58The comparison was conducted as a model-vs-base-model evaluation, measuring which model produced the stronger response.
59
60---
61
62## Evaluation Results
63
64The model demonstrated a substantial improvement over the base model on agricultural questions.
65
66| Domain | Win rate vs. base model |
67|---|---:|
68| Agriculture | **79%** |
69
70On the agricultural evaluation, the adapted model was preferred over the base Llama 3.3 70B Instruct model in **79%** of evaluated comparisons.
71
72This indicates that targeted agricultural SFT substantially shifted the behaviour of the general-purpose model toward the intended domain.
73
74The evaluation considers factors such as:
75- Relevance to the agricultural question
76- Agricultural knowledge
77- Quality of explanation
78- Practical usefulness
79- Domain-specific reasoning
80
81---
82
83## Agricultural Benchmark Direction
84
85Agricultural LLM evaluation is an emerging area, with dedicated benchmarks beginning to test whether models can actually reason about agriculture rather than simply perform general language tasks.
86
87Relevant evaluation work includes:
88
89- **AgriBench:** Evaluates agricultural capabilities in multimodal models across real-world agricultural tasks and topics.
90- **AgriEval:** Evaluates agricultural knowledge and reasoning across major agricultural categories and multiple levels of cognitive ability, including memorisation, understanding, inference, and generation.
91
92These benchmarks provide useful directions for future evaluation of this model.
93
94The current reported result is the 79% agriculture win rate against the base model. No additional benchmark score is claimed here unless the model has been explicitly evaluated on that benchmark.
95
96---
97
98## Why a 70B Agricultural Model?
99
100Agricultural problems are rarely isolated facts. A useful agricultural model may need to connect:
101
102$$\text{crop} \rightarrow \text{soil} \rightarrow \text{climate} \rightarrow \text{pests} \rightarrow \text{cultivation practice} \rightarrow \text{expected outcome}$$
103
104That makes agriculture a useful test of whether a language model can apply domain knowledge rather than simply retrieve information.
105
106The results from this training run suggest that relatively targeted domain adaptation can meaningfully change the behaviour of a large general-purpose model.
107
108Instead of training a foundation model from scratch, a specialised agricultural capability can be developed by combining:
109
110> **Large general-purpose model + targeted agricultural data + domain-specific evaluation**
111
112---
113
114## The Bigger Vision
115
116The long-term opportunity goes beyond an agricultural chatbot. East Africa needs agricultural systems that can connect:
117
118$$\text{Agricultural research} \rightarrow \text{Agricultural knowledge} \rightarrow \text{Local languages} \rightarrow \text{Digital tools} \rightarrow \text{Farm-level decisions}$$
119
120The six-language direction of this project — Swahili, Kinyarwanda, Somali, Lingala, Luganda, and English — is intended to explore that connection.
121
122The goal is to build models that can eventually provide agricultural knowledge in the languages already used by farming communities.
123
124- From agricultural research to agricultural knowledge.
125- From agricultural knowledge to agricultural action.
126
127---
128
129## Intended Use
130
131This model is intended for research and development involving:
132
133- 🌾 Agricultural LLMs
134- 🤖 Agricultural question-answering
135- 🧑🌾 Farmer advisory systems
136- 📚 Agricultural education
137- 🔬 Agronomy research
138- 🌍 African-language agricultural AI
139- 🌦️ Climate-smart agriculture
140- 🧠 Domain adaptation research
141- 📊 Agricultural model evaluation
142
143---
144
145## How to Use
146
147Install the required libraries:
148pip install torch transformers peft
##load lora adapters
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
BASE = "meta-llama/Llama-3.3-70B-Instruct-Reference"
ADAPTER = "<this-repo-id>"
device = "cuda" if torch.cuda.is_available() else "cpu"
dtype = torch.float32 if device == "cpu" else torch.bfloat16
base = AutoModelForCausalLM.from_pretrained(
BASE,
dtype=dtype
).to(device)
model = PeftModel.from_pretrained(base, ADAPTER)
# Optional: merge LoRA weights into the base model
# for potentially simpler/faster inference.
model = model.merge_and_unload()
model.eval()
tokenizer = AutoTokenizer.from_pretrained(BASE)
messages = [
{
"role": "user",
"content": "What are some ways to improve soil fertility before planting?"
}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
inputs = tokenizer(
text,
return_tensors="pt"
).to(device)
with torch.inference_mode():
out = model.generate(
**inputs,
max_new_tokens=512
)
print(
tokenizer.decode(
out[0][inputs["input_ids"].shape[1]:],
skip_special_tokens=True
)
)
## Training Run Details
- **AutoScientist Job ID:** `dd0c2472-0e0c-4eb7-a0f3-2d23711d68cd`
- **Training Experiment ID:** `ef562e27-51a8-496f-8d2f-3fe55f65b2ac`
- **Training method:** SFT
- **Training type:** LoRA
- **Base model:** Meta Llama 3.3 70B Instruct
---
## Dataset
The model was trained using the `adaption-agronomy_qa_pairs` dataset.
The dataset contains 14,996 agricultural Q&A examples in its broader release and was remastered using Adaption's Adaptive Data platform.
The remastered dataset received a B quality grade with a reported 46.0% relative quality improvement.
The dataset covers practical agricultural topics including crop cultivation, pest management, soil management, hydroponics, cassava farming, pasture improvement, and agricultural systems.
---
## Limitations
This is a research model. It should not be treated as a replacement for:
- Agricultural extension officers
- Agronomists
- Veterinarians
- Local agricultural experts
- Government agricultural services
Agricultural recommendations can depend heavily on:
- Local climate
- Soil conditions
- Crop variety
- Season
- Pest prevalence
- Available inputs
- Farming practices
- Local regulations
Model outputs should therefore be independently verified before being used for consequential agricultural decisions.
The multilingual project direction should also not be interpreted as evidence that the current adapter has equal performance across all six languages. Multilingual performance requires dedicated evaluation.
---
## Acknowledgements
This model was trained using Adaption Labs' AutoScientist as part of the Adaption Labs AutoScientist Challenge.
The project explores how targeted datasets, automated training workflows, and large language models can be combined to develop specialised AI capabilities for domains with significant real-world impact.
## Citation
@misc{adaption_agronomy_2026,
title = {East Africa Agronomy Llama 3.3 70B},
author = {Nene, Ray},
year = {2026},
url = {[https://huggingface.co/RayNene](https://huggingface.co/RayNene)}
}