Downloads · 30 days
28
100% of all-time downloads
shreyansh24/gemma3n-e2b-cddm-finetune
gemma3n-e2b-cddm-finetune is a text generation model from shreyansh24. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as gemma.
Vision Language Fine Tuning for Crop Disease Diagnosis This repository hosts the adapters and inference code for a vision-language model fine-tuned on agricultural data using QLoRA (via Unsloth). The project is active…
Downloads · 30 days
28
100% of all-time downloads
All-time downloads
28
Public
Repo size
9.9 GB
Likes
0
Public
Click a slice to open those files.
.safetensors169 MB · 79%
From the Hugging Face model README
Vision Language Fine Tuning for Crop Disease Diagnosis This repository hosts the adapters and inference code for a vision-language model fine-tuned on agricultural data using QLoRA (via Unsloth). The project is actively in progress.
Fine-tuning of the Gemma-3n-e2b-it model to build a multimodal assistant capable of understanding leaf images and conversational input for accurate crop disease diagnosis.
Intended Use:
Limitations:
pip install unsloth datasets transformers huggingface_hub timm
from huggingface_hub import login
from unsloth import FastVisionModel, FastModel
from transformers import AutoProcessor
login("YOUR_HF_TOKEN")
processor = AutoProcessor.from_pretrained("USER/AgriVision-Gemma")
model = FastVisionModel.from_pretrained("USER/AgriVision-Gemma")
# Prepare conversation
messages = [
{"role":"system","content":[{"type":"text","text":"You are a crop disease diagnosis assistant."}]},
{"role":"user","content":[{"type":"image","image": my_leaf_image}, {"type":"text","text":"What disease on this leaf?"}]}
]
inputs = processor(text=processor.apply_chat_template(messages), images=[my_leaf_image], return_tensors="pt").to(model.device)
output = model.generate(**inputs)
print(output)
FastModel with 4-bit quantization and LoRA adapters configured on all-linear layers.Trainer with 8-bit AdamW, gradient checkpointing, and batched conversational inputs.Frameworks: PyTorch, Transformers, Unsloth Libraries: datasets, PIL, timm, numpy, huggingface_hub
We welcome community feedback and improvements:
This model is released under the MIT License.