Instructions to use subbuks/agribot-qlora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use subbuks/agribot-qlora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-0.5B-Instruct") model = PeftModel.from_pretrained(base_model, "subbuks/agribot-qlora") - Notebooks
- Google Colab
- Kaggle
AgriBot โ Agriculture QLoRA Adapter
AgriBot is an experimental agriculture question-answering adapter fine-tuned from Qwen/Qwen2.5-0.5B-Instruct using QLoRA and PEFT.
Model details
- Base model: Qwen/Qwen2.5-0.5B-Instruct
- Fine-tuning: QLoRA / LoRA adapters
- Training dataset: KisanVaani/agriculture-qa-english-only
- Intended use: Educational and experimental agricultural question answering
- Status: Experimental; not independently validated
Usage
This repository contains a LoRA adapter, not the complete base model. Load it together with the original base model using Transformers and PEFT.
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
import torch
base_id = "Qwen/Qwen2.5-0.5B-Instruct"
adapter_id = "subbuks/agribot-qlora"
tokenizer = AutoTokenizer.from_pretrained(base_id)
base = AutoModelForCausalLM.from_pretrained(
base_id,
torch_dtype=torch.float32,
)
model = PeftModel.from_pretrained(base, adapter_id)
model.eval()
messages = [
{"role": "user", "content": "What are the benefits of crop rotation?"}
]
inputs = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_tensors="pt",
)
with torch.no_grad():
outputs = model.generate(**{"input_ids": inputs}, max_new_tokens=120)
print(tokenizer.decode(
outputs[0][inputs.shape[-1]:],
skip_special_tokens=True,
))
Limitations
Outputs may be inaccurate, incomplete, or outdated. Agricultural advice depends on local climate, soil, crop variety, and other conditions. Verify important decisions with qualified local agricultural experts. Do not rely on this model alone for pesticide, disease, or fertilizer decisions.
Licensing and attribution
The base model is distributed under Apache-2.0. Review its license and preserve applicable notices when redistributing. The training dataset may have separate terms; check its dataset card before redistribution. This adapter's publication does not imply endorsement by the base-model or dataset authors.
Evaluation
No independent benchmark or agricultural safety evaluation is claimed.
- Downloads last month
- 1