YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
π CapraMind-V1-small
A Specialized Large Language Model for Dairy Goat Farming Management
CapraMind-V1-small is a lightweight, domain-specific language model fine-tuned on high-quality dairy goat husbandry knowledge. It provides accurate, safe, and practical guidance on nutrition, reproduction, disease prevention, milking, and daily managementβtailored for farmers, veterinarians, and agricultural extension workers.
π Overview
- Base Model: Qwen3-1.7B-Base
- Finetuning Method: LoRA (Low-Rank Adaptation)
- Training Data: 2,755+ expert-verified QA pairs from veterinary manuals, FAO guidelines, and Chinese agricultural standards
- Parameters: ~1.7B (LoRA rank=8, alpha=16)
- Languages: Simplified Chinese (primary), with technical terms in English (e.g., "glucose calcium", "mastitis")
- License: Non-commercial use only (see License)
β¨ Key Features
β
Expert-Level Knowledge
Covers core topics:
- Estrus detection & breeding management
- Lactation nutrition & feed formulation
- Common diseases (e.g., mastitis, postpartum hypocalcemia)
- Vaccination & deworming schedules
- Milking hygiene & udder care
β Safety-First Design
- Refuses to recommend human medications or unverified treatments
- Cites standard protocols (e.g., βAccording to the Dairy Goat Management Handbook, 2022β¦β)
- Falls back to: βPlease consult a licensed veterinarianβ for high-risk queries
β Lightweight & Deployable
- Runs on consumer GPUs (e.g., RTX 3090/4090 with 24GB VRAM)
- Supports GGUF quantization for CPU/edge deployment
π Quick Start
1. Install Dependencies
pip install transformers accelerate torch sentencepiece
2. Load the Model (Hugging Face Style)
from transformers import AutoTokenizer, AutoModelForCausalLM
model_name = "CapraMind-V1-small"
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_name,
trust_remote_code=True,
device_map="auto",
torch_dtype="auto"
)
model.eval()
3. Inference Example
prompt = "ε₯Άε±±ηΎδΊ§εη«ηͺηη΄§ζ₯ε€ηζͺζ½ζ―δ»δΉοΌ"
messages = [
{"role": "system", "content": "δ½ ζ―δΈεθ΅ζ·±ε₯Άε±±ηΎε
½ε»οΌθ―·εΊδΊδΈδΈθ§θεηγ"},
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256, do_sample=False)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
π‘ Note: Use the Qwen chat template (
tokenizer.apply_chat_template) for best results.
π Performance
| Metric | Value |
|---|---|
| Final Training Loss | 1.55 |
| Validation Loss | 1.58 (on held-out 10% data) |
| Accuracy (Expert Eval, n=50) | 92% (factual correctness) |
| Hallucination Rate | 3% (mostly on rare diseases) |
Evaluated by 2 certified livestock veterinarians on real-world farmer questions.
β οΈ Limitations
- Not a substitute for veterinary care: For emergencies, always contact a professional.
- Coverage bias: Strong in common diseases & nutrition; weaker in rare genetic disorders.
- Language: Optimized for Chinese-speaking users; English queries may yield suboptimal results.
π License
This model is released under the MIT License.
- β You may freely use, modify, and distribute this model for both non-commercial and commercial purposes.
- β You are required to include the original copyright notice and license text in any redistribution.
β οΈ Important Note:
This model is built upon Qwen3-1.7B-Base, which is licensed under Alibabaβs Qwen License.
The MIT license applies only to the LoRA adapter weights and training code in this repository.
You must comply with Qwen3βs license terms when using or redistributing the base model.In practice:
- You may deploy CapraMind-V1-small in your app or service.
- But you must not redistribute Qwen3-1.7B-Base unless you comply with Alibabaβs terms (e.g., attribution, non-resale of base weights).
For commercial deployment, we recommend using only the LoRA adapter alongside a legally obtained Qwen3 base model.
π Acknowledgements
- Training data curated from:
- Dairy Goat Production Handbook (China Agricultural Press, 2022)
- FAO Guidelines on Small Ruminant Management
- National Dairy Goat Association (NDGA) protocols
- Built with LLaMA-Factory and Qwen
- Downloads last month
- 5