CoolFace
Modelpublic

Litxiong/Qv3-Plant_spotter-Vl-8b

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes91downloads
Model Card

Qv3-Plant_spotter-Vl-8b

Plant Disease Identification Vision-Language Model

Qv3-Plant_spotter-Vl-8b is a fine-tuned multimodal model for plant disease identification, built upon Qwen3-VL-8B-Instruct. It accepts an image of a plant leaf and identifies the disease or condition present.

Model Architecture

ComponentSpecification
Base ModelQwen3-VL-8B-Instruct
ArchitectureQwen3VLForConditionalGeneration
Total Parameters8,767,123,696 (~8.77B)
Precisionbfloat16
Fine-tuning MethodLoRA (Low-Rank Adaptation)

Language Model

ParameterValue
Hidden Size4096
Intermediate Size12288
Attention Heads32
KV Heads8 (GQA, 4:1 ratio)
Layers36
Head Dim128
Context Length262,144 tokens
Vocabulary Size151,936
ActivationSiLU
NormRMSNorm (eps 1e-6)
RoPE Theta5,000,000
RoPE TypeM-RoPE (interleaved, sections [24,20,20])

Vision Encoder

ParameterValue
Hidden Size1152
Intermediate Size4304
Attention Heads16
Layers27
Patch Size16
Temporal Patch Size2
Spatial Merge Size2
Output Hidden Size4096
ActivationGELU (tanh approximation)

LoRA Configuration

ParameterValue
Rank (r)16
Alpha32
Dropout0.1
Target Modulesqproj, kproj, vproj, oproj, qkv, gateproj, upproj, downproj, proj, linearfc1, linear_fc2
Scalingalpha / r = 2

Training Details

Datasets

The model was fine-tuned on the following plant-related datasets, all in sharegpt multimodal format with the prompt template <image>Identify the plant disease from this image.:

DatasetSamplesClassesEnvironmentLicense
PlantVillage76038LabCC BY 4.0
PlantDoc2,57827FieldCC BY 4.0
Total27,089~100

All datasets were converted to a unified sharegpt format with <image> placeholder for visual input.

Training Hyperparameters

ParameterValue
OptimizerAdamW (8-bit, bitsandbytes)
Learning Rate3e-4
LR SchedulerCosine
Warmup Ratio0.03
Batch Size (per device)1
Gradient Accumulation Steps8
Effective Batch Size8
Epochs2
Max Grad Norm1.0
Precisionbfloat16
Cutoff Length4096 tokens
Image Max Pixels262,144
Gradient CheckpointingEnabled

Training Procedure

  • —Vision Tower: Frozen (preserves general visual understanding)
  • —Multi-modal Projector: Unfrozen (adapts visual-to-text mapping to plant domain)
  • —LoRA Target: All linear layers (both LLM and vision encoder)

Training Metrics

MetricValue
Final Training Loss0.266
Total Runtime~650s (~10.8 min)
Total FLOPs7.96e15
Throughput2.34 samples/s
Hardware1x NVIDIA L40 (48GB VRAM)

Loss Trajectory: The loss decreased from 4.36 at step 1 to 0.008 at step 181, with a final step loss of 0.07, demonstrating stable convergence under cosine LR schedule.

Usage

Python (Transformers)

python
import torch
from transformers import AutoProcessor, Qwen3VLForConditionalGeneration
from PIL import Image

model_path = "Qv3-Plant_spotter-Vl-8b"
processor = AutoProcessor.from_pretrained(model_path)
model = Qwen3VLForConditionalGeneration.from_pretrained(
    model_path, torch_dtype=torch.bfloat16, device_map="auto"
)

image = Image.open("leaf.jpg").convert("RGB")
prompt = "<image>Identify the plant disease from this image."
inputs = processor(images=image, text=prompt, return_tensors="pt").to(model.device)
output = model.generate(**inputs, max_new_tokens=50)
print(processor.decode(output[0], skip_special_tokens=True))

llama.cpp (GGUF)

bash
./llama-cli \
    -m Qv3-Plant_spotter-Vl-8b-q4_k_m.gguf \
    -mmproj mmproj-Qv3-Plant_spotter-Vl-8b.gguf \
    --image leaf.jpg \
    -p "<image>Identify the plant disease from this image." \
    -n 50

Available Formats

FormatFileSize
HuggingFace (safetensors, bf16)Full model directory~17.5 GB
GGUF (bf16)Qv3-Plant_spotter-Vl-8b.gguf~16 GB
GGUF (Q4KM)Qv3-Plant_spotter-Vl-8b-q4_k_m.gguf~4.7 GB
LoRA Adapteradapter_model.safetensors~168 MB

License & Attribution

  • —Base Model: Qwen3-VL-8B-Instruct (Apache 2.0)
  • —Fine-tuned Weights: Apache 2.0
  • —Training Datasets:
  • —PlantVillage: CC BY 4.0 (Zenodo)
  • —PlantDoc: CC BY 4.0 (HuggingFace)

Limitations

  • —Trained primarily on controlled/lab and field images; complex real-world scenarios may reduce accuracy
  • —Disease classes are limited to ~120 categories covered by the training datasets
  • —The model may inherit biases from the base model and training data distribution
  • —Not a substitute for professional agricultural diagnosis

Citation

bibtex
@misc{qv3-plant-spotter-vl-8b,
  author = {},
  title = {Qv3-Plant_spotter-Vl-8b: Plant Disease Identification via LoRA Fine-tuned Qwen3-VL},
  year = {2026},
  publisher = {HuggingFace},
  url = {https://huggingface.co/Litxiong/Qv3-Plant_spotter-Vl-8b}
}