Downloads · 30 days
15
20% of all-time downloads
me-nabi/hindikrishi-qwen2.5-3b-merged
hindikrishi-qwen2.5-3b-merged is a text generation model from me-nabi. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
Downloads · 30 days
15
20% of all-time downloads
All-time downloads
75
Public
Parameters
3.1B
6.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors6.2 GB · 100%
From the Hugging Face model README
Fine-tuned on 21K examples. Giving Indian farmers crop advice in Hindi.
</div>| Parameter | Value |
|---|---|
| Base Model | Qwen/Qwen2.5-3B-Instruct |
| Method | QLoRA (4-bit quantization + LoRA r=16) |
| Training Data | 21,069 instruction-response pairs |
| Languages | Hindi (primary), English |
| Training Hardware | NVIDIA A100 80GB (RunPod) |
| Training Time | 83 minutes |
| Final Training Loss | 0.388 |
| Epochs | 2 |
| Trainable Parameters | 29.9M / 3.1B (0.96%) |
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
from peft import PeftModel
# Load base model in 4-bit
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.float16,
bnb_4bit_use_double_quant=True,
)
base_model = AutoModelForCausalLM.from_pretrained(
"Qwen/Qwen2.5-3B-Instruct",
quantization_config=bnb_config,
device_map="auto",
)
# Load fine-tuned LoRA adapter
model = PeftModel.from_pretrained(base_model, "me-nabi/farmer-advisory-hindi-qwen2.5-3b")
tokenizer = AutoTokenizer.from_pretrained("me-nabi/farmer-advisory-hindi-qwen2.5-3b")
model.eval()
# Ask a question
SYSTEM = """आप भारतीय किसानों के लिए एक कृषि विशेषज्ञ सहायक हैं।
आप फसल रोग, कीट प्रबंधन, उर्वरक और खेती की सलाह देते हैं।
हमेशा व्यावहारिक सलाह दें और स्थानीय KVK से पुष्टि करने की सलाह दें।"""
question = "सरसों में माहू कीट के लिए कौन सा कीटनाशक छिड़कें?"
prompt = f"<|im_start|>system\n{SYSTEM}<|im_end|>\n<|im_start|>user\n{question}<|im_end|>\n<|im_start|>assistant\n"
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=200,
temperature=0.7,
do_sample=True,
repetition_penalty=1.1,
)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
Q: गेहूं में पीला रतुआ रोग के लक्षण क्या हैं?
A: गेहूं में पीला रतुआ रोग के लक्षण में पौधों की पत्तियाँ पीली हो जाती हैं। इसे नियंत्रित करने के लिए कापर ऑक्सीक्लोराइड (100 ग्राम प्रति 200 लीटर पानी) का छिड़काव करें। अधिक जानकारी के लिए अपने नजदीकी KVK से संपर्क करें।
Q: सरसों में माहू कीट के लिए कौन सा कीटनाशक छिड़कें?
A: सरसों में माहू कीट के लिए Imidacloprid का उपयोग करें। इसकी मात्रा 0.5-1 ग्राम प्रति लीटर पानी में मिलाकर छिड़कें। यह छिड़काव बुवाई के 20-30 दिन बाद करें। अधिक जानकारी के लिए अपने नजदीकी KVK से संपर्क करें।
Q: रबी सीजन में गेहूं की बुवाई कब करनी चाहिए?
A: रबी सीजन में गेहूं की बुवाई 15-20 अक्टूबर से 10-15 नवंबर के बीच करनी चाहिए। अधिक जानकारी के लिए अपने नजदीकी KVK से संपर्क करें।
Q: How to control aphids in mustard crop?
A: Aphid infestations can be controlled by spraying with insecticides like Malathion 50% EC or Quinalphos 25% EC at a rate of 1.0-1.5 liters per hectare.
Q: What fertilizer should I use for wheat?
A: A balanced fertilizer with nitrogen (N), phosphorus (P), and potassium (K) is ideal. The recommended NPK fertilizers are 60 kg/ha of urea (46% N), 20 kg/ha of superphosphate, and 15 kg/ha of muriate of potash. Additionally, apply 50 kg/ha of farmyard manure to enhance soil fertility.
The model was trained on 21,069 instruction-response pairs from multiple sources:
| Source | Examples | Type |
|---|---|---|
| GPT-4o-mini generated from ICAR PDFs | 4,335 | Hindi crop disease Q&A with specific dosages |
| GPT-4o-mini targeted generation (crops × subtopics) | 4,726 | Hindi — 25 crops, diseases, pesticides, schemes |
| KisanVaani agriculture Q&A | 22,615 → deduplicated | English agriculture Q&A |
| Mahesh2841/Agriculture | 5,916 | English agriculture Q&A |
| DigiGreen + CGIAR | 2,274 | Hindi agriculture translations |
| Vikaspedia (scraped via Playwright) | 295 | Hindi government advisory content |
| Indic Anudesh (AI4Bharat) | 7,577 | Hindi instruction-following data |
All data was cleaned, deduplicated, and converted to Qwen ChatML format for training.
LoRA Config:
r: 16
lora_alpha: 16
target_modules: [q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj]
dropout: 0
bias: none
Training Args:
per_device_train_batch_size: 32
gradient_accumulation_steps: 1
learning_rate: 2e-4
num_train_epochs: 2
optimizer: adamw_8bit
lr_scheduler: cosine
warmup_steps: 20
max_seq_length: 512
fp16: true
gradient_checkpointing: true
Step 10: 1.495 Step 50: 0.645 Step 100: 0.555 Step 200: 0.477 Step 500: 0.434 Step 800: 0.408 Step 1000: 0.388 Step 1250: 0.348 Final: 0.388
The model has been trained on data covering these Indian crops:
Cereals: Wheat (गेहूं), Rice (धान), Maize (मक्का), Bajra, Jowar
Pulses: Chickpea (चना), Pigeon pea (अरहर), Black gram (उड़द), Green gram (मूंग)
Oilseeds: Mustard (सरसों), Soybean (सोयाबीन), Groundnut (मूंगफली)
Cash Crops: Cotton (कपास), Sugarcane (गन्ना)
Vegetables: Tomato (टमाटर), Onion (प्याज), Chili (मिर्च), Brinjal (बैंगन), Okra (भिंडी), Potato (आलू), Cauliflower (गोभी), Spinach (पालक)
Fruits: Mango (आम), Banana (केला), Grapes (अंगूर), Orange (संतरा), Guava (अमरूद)
Spices: Turmeric (हल्दी), Ginger (अदरक), Garlic (लहसुन), Coriander (धनिया), Cumin (जीरा)
Intended users:
Not intended for:
Base Model: Qwen 2.5 3B Instruct (3,115,872,256 parameters) ↓ 4-bit NF4 Quantization (BitsAndBytes) ↓ LoRA Adapters (29,933,568 trainable parameters) ↓ Fine-tuned on 21,069 agricultural Q&A pairs ↓ ChatML format: system + user + assistant
@misc{hindikrishi2026,
title={HindiKrishi: A Fine-tuned Hindi Crop Advisory Model for Indian Farmers Using QLoRA},
author={Md Ehtasham Nabi},
year={2026},
publisher={HuggingFace},
url={https://huggingface.co/me-nabi/farmer-advisory-hindi-qwen2.5-3b}
}
Md Ehtasham Nabi
⚠️ This model is for informational purposes only. Agricultural advice varies significantly by region, soil type, climate, and season. Always confirm pesticide recommendations, dosages, and application methods with your local Krishi Vigyan Kendra (KVK) or qualified agricultural extension officer before application. Incorrect pesticide usage can damage crops, harm the environment, and pose health risks.