Adapters fine-tuned on a 4,000-example subsample of KisanVaani/agriculture-qa-english-only
(500 validation / 500 test, seed 42). They are adapters, not full models: load them on top of the base model.
| LoRA | QLoRA | |
|---|---|---|
| rank / alpha / dropout | 16 / 32 / 0.05 | 16 / 32 / 0.05 |
| target modules | q,k,v,o_proj | q,k,v,o_proj |
| base precision | bf16 | 4-bit NF4 (double quant), bf16 compute |
| micro-batch x grad-accum | 4 x 4 | 2 x 8 |
| learning rate | 2e-4 | 1e-4 |
| epochs | 3 | 3 |
LoRA and QLoRA differ in learning rate / micro-batch, so their comparison is indicative, not perfectly controlled.
| model | rouge_l | bertscore_f1 | token_f1 | ref_contained | exact_match | avg_words_pred | avg_words_ref |
|---|---|---|---|---|---|---|---|
| base | 0.1074 | 0.8482 | 0.1590 | 0.0350 | 0.0000 | 94.6700 | 23.6200 |
| lora | 0.3559 | 0.9046 | 0.3973 | 0.1150 | 0.1050 | 24.1550 | 23.6200 |
| qlora | 0.2189 | 0.8784 | 0.2649 | 0.0350 | 0.0200 | 35.3800 | 23.6200 |
rouge_l/bertscore_f1: overlap/semantic similarity with short reference answers; token_f1: token-level F1;
ref_contained: reference answer appears inside the prediction. Automatic metrics are proxies, not agronomic validation.
from agri_llm import AgriLLM
llm = AgriLLM(adapters={"qlora": "<this-repo-or-folder>"})
print(llm.generate("How do I control aphids on cotton?", mode="qlora"))
Trained on community-curated Q&A, not agronomist-verified. No retrieval, so it can state wrong facts confidently (see failure_candidates.csv). Research prototype - not a substitute for professional agricultural advice.
Qwen/Qwen2.5-1.5B-Instruct