lora-lateblight-v5 π± β OpenLLaMA-3B Fine-Tuned for Potato Late Blight Risk Prediction in Huancavelica, Peru
Author: Jorge Luis Alonso (@jalonso24)
Model Base: openlm-research/open_llama_3b
Adapter Format: LoRA (PEFT)
Location: Huancavelica, Andes, Peru
Languages: Spanish, English
Task: Multi-class classification (Bajo
, Moderado
, Alto
) of late blight disease risk using natural language prompts
π What is this?
lora-lateblight-v5
is a lightweight, prompt-based classifier that predicts potato late blight risk levels using natural language inputs. It was fine-tuned with LoRA adapters on a curated dataset of expert-labelled and synthetic examples from Huancavelica, Peru.
It supports bilingual prompts, runs on low-cost hardware, and helps agronomists and rural farmers make better decisions using just weather and crop descriptions in plain language.
π§ͺ How was it trained?
- Fine-Tuning Method: LoRA (Low-Rank Adaptation)
r=32
,alpha=16
,dropout=0.1
- Training Framework: PEFT with
transformers
, Colab T4 GPU - Epochs: 5, using mixed precision with float32 stabilization
- Data Sources:
- Historical climate + crop risk data (SENAMHI, CIP)
- Synthetic "Alto" risk cases for balancing
- Distilled "Moderado" cases from GPT-4 + Gemini consensus
- Prompt Style:
- Few-shot (3 labeled examples:
Bajo
,Moderado
,Alto
) - Natural, bilingual inputs (e.g., Spanish + English)
- Example format:
La variedad es INIA-302 Amarilis, sembrada en noviembre. La precipitaciΓ³n fue 18.4 mm, la temperatura mΓ‘xima 17.2Β°C, la mΓnima 6.1Β°C y la humedad promedio 84.12%. ΒΏCuΓ‘l es el riesgo de tizΓ³n tardΓo? Riesgo:
- Few-shot (3 labeled examples:
π Evaluation Summary
Metric | Score |
---|---|
Accuracy | 73% |
Recall (Alto) | 100% |
F1-score (Alto) | 0.78 |
F1-score (Mod.) | 0.25 |
- β Model reliably detects all high-risk (Alto) cases
- β οΈ Struggles with moderate-risk (Moderado) due to timing subtleties
- βοΈ Prioritizes early warning over precision β suitable for advisory tools
π Files Included
adapter_model.safetensors
β LoRA adapter weightstokenizer/
β Tokenizer from OpenLLaMA 3BREADME.md
β This model card
π§ Intended Use
- Forecast potato late blight risk in high-altitude Andean regions
- Run lightweight inference on devices like Beelink Mini PCs
- Support local extension workers, agronomists, or AI-powered alert tools
- Educate farmers using mobile-friendly prompts in Spanish or English
π§ Known Limitations
- Overpredicts
Alto
in ambiguous cases β intended as a safety trade-off - Struggles with unclear or borderline
Moderado
cases - Not designed for automated spraying systems or IoT-triggered actions
- Needs expert validation before field-level decisions
π«· Try It (Coming Soon)
Weβre working on a Gradio demo where youβll be able to enter:
- Crop variety
- Planting month
- Weekly humidity, temperature, and rainfall
π and receive a natural-language Riesgo prediction.
π Citation
@misc{alonso2025lateblight,
author = {Jorge Luis Alonso},
title = {Predicting Potato Late Blight in Huancavelica, Peru, Using OpenLLaMA 3B + LoRA},
year = {2025}, {\url{https://www.linkedin.com/pulse/improving-potato-late-blight-forecasting-huancavelica-alonso-5h1af}}
note = {Fine-tuning based on expert-labelled and synthetic data with few-shot prompt classification},
howpublished = {\url{https://huggingface.co./jalonso24/lora-lateblight-v5}}
}
Based on foundational studies by Gastelo et al. (2025), Giraldo et al. (2010), and Saffer et al. (2024).
Model tree for jalonso24/lora-lateblight-v3
Base model
openlm-research/open_llama_3b