File size: 4,969 Bytes
f93bf21
b7729a0
 
f93bf21
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b7729a0
f93bf21
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b7729a0
51ad6be
b7729a0
36367a6
51ad6be
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b7729a0
51ad6be
 
 
 
 
 
 
 
 
b7729a0
51ad6be
 
 
 
b7729a0
 
51ad6be
 
 
 
 
 
 
 
 
b7729a0
51ad6be
 
 
b7729a0
51ad6be
 
 
 
 
 
 
b7729a0
ad4a184
b7729a0
ad4a184
51ad6be
 
 
 
b7729a0
51ad6be
 
 
 
 
 
b7729a0
51ad6be
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b7729a0
c23685e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
---
title: "AgriLlama: Plant Disease Information Assistant"
description: "AgriLlama is a fine-tuned large language model based on Llama3.2:1B, designed to assist Indian farmers with plant disease identification and management."
version: "1.0"
author: "Sike Aditya"
repository: "https://huggingface.co/sikeaditya/agri_assist_llm"
tags:
  - Agriculture
  - Plant Disease
  - LLM
  - AI
  - India
model:
  base: "meta/Llama3.2:1B"
  fine_tuning_dataset: "1000 samples focusing on plant diseases in Indian agriculture"
  format: "Alpaca Instruct Format"
usage:
  - "Farmers"
  - "Agronomists"
  - "Agricultural extension workers"
installation:
  ollama: "curl -fsSL https://ollama.ai/install.sh | sh"
usage_examples:
  - command: "ollama run AgriLlama 'Explain Red Rot in sugarcane in simple terms for Indian farmers.'"
    description: "Provides an easy-to-understand explanation of Red Rot disease in sugarcane."
dataset:
  crops:
    Sugarcane:
      - "Bacterial Blight"
      - "Healthy"
      - "Red Rot"
    Maize:
      - "Blight"
      - "Common Rust"
      - "Gray Leaf Spot"
      - "Healthy"
    Cotton:
      - "Bacterial Blight"
      - "Curl Virus"
      - "Fusarium Wilt"
      - "Healthy"
    Rice:
      - "Bacterial Blight"
      - "Blast"
      - "Brownspot"
      - "Tungro"
    Wheat:
      - "Healthy"
      - "Septoria"
      - "Strip Rust"
contact:
  email: "[email protected]"
  issues: "https://github.com/sikeaditya/agri_assist_llm/issues"
---
# AgriLlama: Plant Disease Information Assistant

AgriLlama is a fine-tuned large language model based on Llama3.2:1B, specifically designed to provide detailed, actionable information about plant diseases to Indian farmers. It offers clear, concise, and locally relevant guidance on disease identification, symptoms, causes, severity, and treatment measures across major crops such as Sugarcane, Maize, Cotton, Rice, and Wheat.

## Features

- **Tailored Guidance:** Provides comprehensive details on various plant diseases affecting Indian crops.
- **Practical Recommendations:** Offers clear instructions on treatment and prevention, helping farmers manage crop health.
- **User-Friendly:** Utilizes the Alpaca Instruct Format to generate responses in simple, accessible language.
- **Versatile Applications:** Suitable for use by farmers, agronomists, and agricultural extension workers.

## Model Details

- **Base Model:** Llama3.2:1B
- **Fine-Tuning Dataset:** Custom dataset of 200 samples focusing on plant diseases in Indian agriculture.
- **Intended Use:** Assisting in the identification, explanation, and management of plant diseases.

## Installation

To use AgriLlama, install the required libraries:

```bash
pip install transformers torch
```

## Usage

### Using Hugging Face Transformers

Here’s an example of how to use AgriLlama with the Hugging Face Transformers library:

```python
from transformers import AutoTokenizer, AutoModelForCausalLM
# Load the tokenizer and model from the Hugging Face Hub
tokenizer = AutoTokenizer.from_pretrained("your-username/AgriLlama")
model = AutoModelForCausalLM.from_pretrained("your-username/AgriLlama")
# Define a prompt
prompt = "Explain Red Rot in sugarcane in simple terms for Indian farmers."
# Tokenize and generate a response
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=256)
# Decode and print the generated response
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
```

*Note:* Replace `your-username/AgriLlama` with the actual path of your repository.

### Using Ollama

You can also use AgriLlama with [Ollama](https://ollama.ai), a simple way to run large language models locally.

1. Install Ollama if you haven't already:

```bash
curl -fsSL https://ollama.ai/install.sh | sh
```

2. Pull the model from Ollama [Library](https://ollama.com/sike_aditya/AgriLlama)
```bash
ollama pull sike_aditya/AgriLlama
```

3. Run the model using Ollama:

```bash
ollama run AgriLlama "Explain Red Rot in sugarcane in simple terms for Indian farmers."
```

This will generate a response based on the model’s fine-tuned dataset.

## Fine-Tuning and Training

AgriLlama was fine-tuned using a custom dataset created in the Alpaca Instruct Format. The dataset covers detailed plant disease information tailored to the Indian context and includes samples for:

- **Sugarcane:** Bacterial Blight, Healthy, Red Rot
- **Maize:** Blight, Common Rust, Gray Leaf Spot, Healthy
- **Cotton:** Bacterial Blight, Curl Virus, Fusarium Wilt, Healthy
- **Rice:** Bacterial Blight, Blast, Brownspot, Tungro
- **Wheat:** Healthy, Septoria, Strip Rust

## Dataset

The fine-tuning dataset consists of carefully curated samples that provide comprehensive, accurate information designed to help users manage crop diseases effectively.


## Contact

For questions or suggestions, please open an issue in the repository or contact the authors directly.

---

Happy farming with AgriLlama!