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

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
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for subbuks/agribot-qlora

Adapter
(957)
this model