Why
Small models are what can run cheaply on phones and in low-bandwidth settings, but untuned they "fill in" missing data. Given a facts block with the rainfall forecast missing, untuned Qwen3.5-2B often writes things like "the forecast indicates a critical deficit" or "no pest alerts", which is dangerous for someone deciding when to sow or spray.
Results
Bare prompt Write a short farmer advisory in {language} from these facts.\n\n{facts}, greedy decoding. Scored by a programmatic checker (see the dataset repo).
Table with columns: Test set, Untuned Qwen3.5-2B, krishi-grounded-2b| Test set | Untuned Qwen3.5-2B | krishi-grounded-2b |
|---|
| Original (50 cases) - faithful | 58% | 100% |
| Held-out v2 (48 cases, formats and missing-value markers never seen in training) - faithful | 48% | 100% |
| Held-out v2 - faithful and advice consistent with facts | 33% | 77% |
| Held-out v2 - Hindi faithful | 12/24 | 24/24 |
| Adaption AutoScientist win rate vs base | – | 70.7% |
For comparison, the untuned 2B reaches 88% faithful only with a long instruction prompt, and untuned gemma-4-31B gets 62% with the bare prompt.
Faithful means no number that is absent from the facts, no wrong district or crop, no date outside the sowing window, no number for a missing field, no claim that a missing field is absent, and a "data not available" notice whenever a missing field is mentioned.
Advice consistent means rule-based advice (irrigate when soil moisture is below 20% or rain is more than 10% below normal; drainage when rain is more than 10% above; waterlogging caution when soil moisture is above 35%) doesn't contradict the numbers.
Usage
from transformers import AutoTokenizer, AutoModelForImageTextToTextfrom peft import PeftModelimport torchtok = AutoTokenizer.from_pretrained("Qwen/Qwen3.5-2B")base = AutoModelForImageTextToText.from_pretrained("Qwen/Qwen3.5-2B", dtype=torch.bfloat16, device_map="auto")model = PeftModel.from_pretrained(base, "Nandish-s/krishi-grounded-2b-lora").merge_and_unload()facts = "district: Pune\ncrop: rice\nseason: Rabi 2026-27\nrainfall_forecast_mm: unknown\ntemp_max_c: 41\nsoil_moisture_pct: 15\nmarket_price_inr_per_quintal: 3050\nsowing_window: 2026-11-01 to 2026-11-09\npest_alert: aphids (low)"msgs = [{"role": "user", "content": f"Write a short farmer advisory in Hindi from these facts.\n\n{facts}"}]ids = tok.apply_chat_template(msgs, add_generation_prompt=True, enable_thinking=False, return_tensors="pt", return_dict=True).to(model.device)out = model.generate(**ids, max_new_tokens=400, do_sample=False)print(tok.decode(out[0][ids["input_ids"].shape[1]:], skip_special_tokens=True))
Load the base with AutoModelForImageTextToText (not AutoModelForCausalLM). The adapter's module names follow the full Qwen3.5 model class, and with the causal-LM class PEFT silently fails to attach it.
Input fields: district, crop, season, rainfall_forecast_mm, rainfall_deviation_pct, temp_max_c, soil_moisture_pct, market_price_inr_per_quintal, sowing_window, pest_alert. Any of them may be missing, null, -, N/A, unknown, or left out. JSON, key-value lines, tables, CSV and bulletins all work.
Input: Max temp (C)=41 ; Pest advisory=aphids (low) ; Expected rain (mm)=unknown ; Rain vs normal (%)=unknown ; Soil moisture (%)=15 ; Mandi rate (Rs/qtl)=3050 ; Season=Rabi 2026-27 ; Sow between=2026-11-01 to 2026-11-09 ; Crop=rice ; District=Pune
krishi-grounded-2b: Pune farmers growing rice this Rabi 2026-27 season should sow between 2026-11-01 and 2026-11-09. Current soil moisture stands at 15%. Soil moisture is low, so consider irrigating before sowing. The mandi price is 3050 INR per quintal. Data not available for the rainfall forecast. Watch for aphids (low). Pest risk is low, but continue routine checks. The maximum temperature is expected to be 41°C. Check with your local agriculture office before making decisions.
Untuned Qwen3.5-2B (excerpt): "…With soil moisture at 15%, check if irrigation is required based on the expected rainfall. If rainfall is below normal, apply irrigation immediately…" It writes a long markdown report and reasons about rainfall it was never given.
Training
- Data: 2,400 synthetic rows (1,200 English, 1,200 Hindi). Facts are drawn at random over 12 districts and 10 crops, with 6 missing-data patterns. Each fact set is rendered in one of 6 layouts with one of 5 missing-value markers. Completions are template-built from the facts and every row is verified by the checker. 0 rejected.
- Adaption pipeline: the rows went through Adaptive Data (adapt). Training used the original, checker-verified prompt/completion columns, because the adapt rewrites reintroduced factual errors in about 26% of rows in an earlier pilot.
- AutoScientist: Qwen/Qwen3.5-2B, LoRA r=32, α=64, dropout 0.05, learning rate 1e-4, 3 epochs (63 steps), 1 iteration. Final train loss 0.067, eval loss 0.056.
- What mattered: with AutoScientist's default settings (lr 1e-5, 1 epoch, r=16) the model didn't improve at all (50% faithful). The stronger settings gave 98%. Diversifying formats and missing markers then fixed CSV and Hindi failures on unseen formats (run 3).
Limitations
- Synthetic data, fixed schema. It is trained only on the 10 fields above, Rabi season, 12 districts and 10 crops. Other crops and places may work but are untested. The faithfulness checker only knows those districts and crops.
- Template style. Outputs are short and formulaic, close to the training templates. Pest names stay in English inside Hindi text.
- Advice thresholds blur near the 35% soil-moisture cut-off: it sometimes calls 36–40% "adequate". About 23% of held-out v2 outputs have some advice inconsistency.
- Hindi edge case: with Hindi-labelled input and a missing price, 3 of 48 outputs had a garbled first sentence that dropped the crop name.
- Hindi has not yet been reviewed by a native speaker. Usefulness and fluency are not scored, only faithfulness, advice consistency and coverage.
- Not for real agronomic decisions without human review.
License
Apache-2.0, same as the base model.