Instructions to use KissanAI/Dhenu-vision-lora-0.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KissanAI/Dhenu-vision-lora-0.1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="KissanAI/Dhenu-vision-lora-0.1", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("KissanAI/Dhenu-vision-lora-0.1", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use KissanAI/Dhenu-vision-lora-0.1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "KissanAI/Dhenu-vision-lora-0.1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KissanAI/Dhenu-vision-lora-0.1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/KissanAI/Dhenu-vision-lora-0.1
- SGLang
How to use KissanAI/Dhenu-vision-lora-0.1 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "KissanAI/Dhenu-vision-lora-0.1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KissanAI/Dhenu-vision-lora-0.1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "KissanAI/Dhenu-vision-lora-0.1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KissanAI/Dhenu-vision-lora-0.1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use KissanAI/Dhenu-vision-lora-0.1 with Docker Model Runner:
docker model run hf.co/KissanAI/Dhenu-vision-lora-0.1
Dhenu Vision LoRA 0.1
Inspired by the mythical Kaamdhenu, the wish-fulfilling cow of Hindu mythology, we, at KissanAI, are introducing a series of finetuned Language Learning Models (LLM), "Dhenu", designed for the agricultural sector. Dhenu merges the depth of agricultural practices with modern AI capabilities, aimed at enriching the farming community with actionable insights. This model embodies the fusion of tradition and technology, offering tailored guidance to navigate the complexities of agriculture with precision and ease. Dhenu stands as a testament to innovation, guiding farmers towards a prosperous and sustainable future.
Introduction
Dhenu-vision-lora-v0.1 is an open-source agricultural disease detection model fine-tuned on the Qwen-VL-chat model. It is specifically designed to assist with diseases among three major crops, rice, maize, and wheat, in conversational way. We incorporate Low Rank adaptation techniques for low-cost fine-tuning on agricultural datasets.
We observed that even with lora, the model is performing 2X better over the base model for the objectives mentioned below.
Model details
Model type:
Base LLM: "Qwen/Qwen-VL-Chat" Method: LoRA
Model date:
Dhenu-vision-lora-v0.1 was trained in 03-2024.
Resources for more information:
https://huggingface.co/Qwen/Qwen-VL-Chat
https://github.com/QwenLM/Qwen-VL
Dataset
Syntehtic dataset of ~9000 images for three major crops, Maize, Rice, and Wheat, for following common disease identifiable from leaves:
- Leaf blight
- Leaf spot
- Streak virus
- Bacterial blight
- Blast
- Tungro
- Crown and Root Rot
- Leaf rust
- Wheat loose smut
For objectives:
- Disease identification
- Symptoms
- Cure
- Prevention methods
- Severity
Evaluation
For a collection of 500 images evaluated using multiple prompt-based approaches, we achieved the following results:
Qwen-VL-chat: 17.95% Dhenu-vision-lora-0.1: 36.13% GPT4-V: 51.59%
License
Qwen-VL-chat license
ToDo
[ ] SFT model
[ ] 15+ crops and 80 diseases
- Downloads last month
- 34
Model tree for KissanAI/Dhenu-vision-lora-0.1
Base model
Qwen/Qwen-VL-Chat