--- license: apache-2.0 language: - en - fr - es - pt - sw - ja - ar base_model: Qwen/Qwen2-0.5B-Instruct tags: - agriculture - multilingual - chatbot - crop-diseases - farming - west-africa pipeline_tag: text-generation --- # AgriChat Multilingual - Agricultural Assistant A multilingual chatbot fine-tuned for agricultural assistance, specifically designed for farmers in West Africa and beyond. ## Model Description - **Base Model:** Qwen/Qwen2-0.5B-Instruct - **Fine-tuning Method:** LoRA (Low-Rank Adaptation) - **Languages:** English, French, Spanish, Portuguese, Swahili, Japanese, Arabic - **Domain:** Agricultural crop diseases, farming practices, pest management - **License:** Apache 2.0 ## Supported Languages | Language | Code | Coverage | |----------|------|----------| | English | en | Full | | French | fr | Full | | Spanish | es | Full | | Portuguese | pt | Full | | Swahili | sw | Full | | Japanese | ja | Full | | Arabic | ar | Full | ## Use Cases - **Crop Disease Identification:** Ask about symptoms and treatments for plant diseases - **Farming Advice:** Get guidance on agricultural practices - **Pest Management:** Learn about controlling pests affecting crops - **Multilingual Support:** Communicate in 7 different languages ## Quick Start ```python from transformers import AutoModelForCausalLM, AutoTokenizer # Load model model = AutoModelForCausalLM.from_pretrained("mesabo/agri-chat-multilingual") tokenizer = AutoTokenizer.from_pretrained("mesabo/agri-chat-multilingual") # Chat example messages = [ {"role": "user", "content": "How do I identify cassava mosaic disease?"} ] text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True) inputs = tokenizer(text, return_tensors="pt") outputs = model.generate(**inputs, max_new_tokens=256, temperature=0.7) response = tokenizer.decode(outputs[0], skip_special_tokens=True) print(response) ``` ## Training Details - **Training Data:** 38 curated Q&A examples across 7 languages - **Epochs:** 3 - **LoRA Parameters:** 2.16M trainable (0.44% of total) - **Training Loss:** 2.54 - **Hardware:** NVIDIA RTX 3090 (25.3 GB) - **Training Time:** ~17 seconds ## Covered Topics ### Crop Diseases - Cassava mosaic disease - Maize leaf blight - Tomato bacterial wilt - Cashew anthracnose - Rice blast disease ### Farming Practices - Organic pest control - Soil health management - Crop rotation benefits - Water conservation ## Limitations - Fine-tuned on limited agricultural domain data - Best suited for common crop diseases in West Africa - May not cover specialized or rare conditions - Responses should be verified with local agricultural experts ## Intended Use This model is designed for: - Agricultural extension workers - Small-scale farmers - Agricultural education platforms - Farming assistance applications ## Citation ```bibtex @misc{agri-chat-multilingual, author = {mesabo}, title = {AgriChat Multilingual - Agricultural Assistant}, year = {2024}, publisher = {Hugging Face}, url = {https://huggingface.co/mesabo/agri-chat-multilingual} } ``` ## Related Models - [mesabo/agri-plant-disease-resnet50](https://huggingface.co/mesabo/agri-plant-disease-resnet50) - Plant disease image classification (95%+ accuracy) ## Contact For questions or issues, please open a discussion on the model page.