Instructions to use RayNene/adaption_agronomy_qa_pairs with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use RayNene/adaption_agronomy_qa_pairs with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("togethercomputer/Meta-Llama-3.3-70B-Instruct-Reference") model = PeftModel.from_pretrained(base_model, "RayNene/adaption_agronomy_qa_pairs") - Notebooks
- Google Colab
- Kaggle
East Africa Agronomy Llama 3.3 70B
A 70B-parameter language model adapted for agricultural knowledge and reasoning
East Africa's food system supports hundreds of millions of people, while agriculture remains one of the region's most important sources of livelihoods. Across Africa, around 300 million people work in agrifood systems, with agrifood systems accounting for approximately 64.5% of total employment.
Yet the next generation faces a different agricultural landscape: changing climate conditions, soil degradation, rising input costs, pests, fragmented access to agricultural knowledge, and increasing pressure to produce more food with limited resources.
Agricultural AI can help close part of this knowledge gap.
But useful agricultural AI needs to do more than understand English-language agricultural literature. It needs to reason about practical farming problems and eventually communicate that knowledge in the languages used by farming communities.
This model is a LoRA adapter for Meta Llama 3.3 70B Instruct, fine-tuned specifically for agricultural and agronomy-focused question answering using Adaption Labs' AutoScientist.
The objective: adapt a frontier-scale language model from general-purpose intelligence toward practical agricultural reasoning.
Model
- Base model:
meta-llama/Llama-3.3-70B-Instruct-Reference - Method: Supervised Fine-Tuning (SFT)
- Adaptation: LoRA / PEFT
- Training platform: Adaption Labs AutoScientist
- Base model size: 70B parameters
- Training data: 14,616 adapted examples
- Primary domain: Agriculture and agronomy
What Was the Model Trained to Understand?
The training data focuses on practical agricultural knowledge, including:
- π± Soil management
- πΎ Crop cultivation
- π Pest management
- π§ Water and growing systems
- πΏ Pasture improvement
- π₯¬ Hydroponics
- π± Cassava farming
- π Livestock and agricultural systems
The dataset also contains scientific and animal-related material, allowing the model to encounter agricultural questions within a broader scientific context.
The aim is not simply to teach the model agricultural terminology.
It is to improve its ability to understand agricultural questions, reason about the underlying problem, and produce useful domain-specific responses.
Why Agricultural AI?
Agriculture is not a small vertical.
FAO estimates that around 300 million people in Africa work in agrifood systems, making food production and related activities one of the continent's largest employment ecosystems.
That makes agricultural knowledge an important piece of digital infrastructure.
A farmer does not necessarily need a model that can recite the definition of nitrogen deficiency.
They need a system that can help reason through questions such as:
- What could be causing poor crop growth?
- How can soil fertility be improved?
- What could be causing a particular pest problem?
- How should water be managed?
- Which cultivation practices are appropriate for a crop?
- How can farming practices respond to changing environmental conditions?
These are fundamentally reasoning problems, not simple retrieval tasks.
This model explores whether targeted fine-tuning can move a general-purpose 70B model toward that kind of specialised agricultural reasoning.
Multilingual Agricultural AI
The broader project is designed around six languages:
- Swahili
- Kinyarwanda
- Somali
- Lingala
- Luganda
- English
These languages connect the project to agricultural communities across East and Central Africa and provide a foundation for research into multilingual agricultural AI.
The long-term goal is straightforward:
Agricultural 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.
The current documented training run uses the supplied adapted training data. Multilingual performance should therefore be evaluated separately rather than assumed from the broader project language coverage.
Training Data
The model was trained on 14,616 rows of adapted data.
The reported domain distribution includes:
| Domain | Share |
|---|---|
| Agriculture | 75% |
| Science | 8% |
| Animal & Nature | 4% |
The training data was prepared through Adaption's Adaptive Data platform before supervised fine-tuning.
Training Configuration
The model was trained using Supervised Fine-Tuning (SFT) with LoRA.
{
"job_id": "dd0c2472-0e0c-4eb7-a0f3-2d23711d68cd",
"training_experiment_id": "ef562e27-51a8-496f-8d2f-3fe55f65b2ac",
"original_model_name": "meta-llama/Llama-3.3-70B-Instruct-Reference",
"trained_model_name": "adaption_agronomy_qa_pairs",
"training_method": "sft",
"training_type": "lora",
"data_format": "chat",
"hyperparams": {
"lora": "true",
"lora_r": 64,
"n_evals": 5,
"n_epochs": 2,
"batch_size": "max",
"lora_alpha": 128,
"lora_dropout": 0,
"min_lr_ratio": 0.1,
"warmup_ratio": 0.05,
"weight_decay": 0.05,
"learning_rate": 0.0001,
"max_grad_norm": 1,
"base_model_size": "70B",
"train_on_inputs": "false",
"training_method": "sft",
"lr_scheduler_type": "cosine",
"scheduler_num_cycles": 0.5,
"lora_trainable_modules": "all-linear"
}
}
### Key Configuration
| Parameter | Value |
|---|---|
| Base model | Llama 3.3 70B Instruct |
| Training method | SFT |
| Adaptation | LoRA |
| LoRA rank | 64 |
| LoRA alpha | 128 |
| Epochs | 2 |
| Learning rate | 1e-4 |
| Weight decay | 0.05 |
| Warmup ratio | 0.05 |
| Scheduler | Cosine |
| Trainable modules | All linear layers |
| Evaluation runs | 5 |
---
## Evaluation Protocol
The 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.
Two evaluation settings were used:
1. **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.
2. **Broader domain-specific evaluation:** A broader agricultural test set was used to examine whether the improvement generalised beyond the exact training examples.
The comparison was conducted as a model-vs-base-model evaluation, measuring which model produced the stronger response.
---
## Evaluation Results
The model demonstrated a substantial improvement over the base model on agricultural questions.
| Domain | Win rate vs. base model |
|---|---:|
| Agriculture | **79%** |
On the agricultural evaluation, the adapted model was preferred over the base Llama 3.3 70B Instruct model in **79%** of evaluated comparisons.
This indicates that targeted agricultural SFT substantially shifted the behaviour of the general-purpose model toward the intended domain.
The evaluation considers factors such as:
- Relevance to the agricultural question
- Agricultural knowledge
- Quality of explanation
- Practical usefulness
- Domain-specific reasoning
---
## Agricultural Benchmark Direction
Agricultural 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.
Relevant evaluation work includes:
- **AgriBench:** Evaluates agricultural capabilities in multimodal models across real-world agricultural tasks and topics.
- **AgriEval:** Evaluates agricultural knowledge and reasoning across major agricultural categories and multiple levels of cognitive ability, including memorisation, understanding, inference, and generation.
These benchmarks provide useful directions for future evaluation of this model.
The 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.
---
## Why a 70B Agricultural Model?
Agricultural problems are rarely isolated facts. A useful agricultural model may need to connect:
That makes agriculture a useful test of whether a language model can apply domain knowledge rather than simply retrieve information.
The results from this training run suggest that relatively targeted domain adaptation can meaningfully change the behaviour of a large general-purpose model.
Instead of training a foundation model from scratch, a specialised agricultural capability can be developed by combining:
> **Large general-purpose model + targeted agricultural data + domain-specific evaluation**
---
## The Bigger Vision
The long-term opportunity goes beyond an agricultural chatbot. East Africa needs agricultural systems that can connect:
The six-language direction of this project β Swahili, Kinyarwanda, Somali, Lingala, Luganda, and English β is intended to explore that connection.
The goal is to build models that can eventually provide agricultural knowledge in the languages already used by farming communities.
- From agricultural research to agricultural knowledge.
- From agricultural knowledge to agricultural action.
---
## Intended Use
This model is intended for research and development involving:
- πΎ Agricultural LLMs
- π€ Agricultural question-answering
- π§βπΎ Farmer advisory systems
- π Agricultural education
- π¬ Agronomy research
- π African-language agricultural AI
- π¦οΈ Climate-smart agriculture
- π§ Domain adaptation research
- π Agricultural model evaluation
---
## How to Use
Install the required libraries:
pip 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)}
}
- Downloads last month
- -