Discover and explore top open-source AI tools and projects—updated daily.
Instruction-tuned LLMs for Chinese medical knowledge
Top 10.3% on SourcePulse
This repository provides instruction-tuned large language models (LLMs) specifically for the Chinese medical domain, named BenTsao (formerly HuaTuo). It aims to improve LLM performance in medical question answering by fine-tuning base models like LLaMA, Bloom, and Huozi with a custom Chinese medical instruction dataset derived from knowledge graphs and literature.
How It Works
The project employs LoRA (Low-Rank Adaptation) for efficient instruction fine-tuning, balancing computational resources and model performance. A key innovation is "knowledge-tuning," which involves a three-stage process: extracting parameters from a question to query a medical knowledge base, retrieving relevant knowledge, and then using this knowledge to generate an answer. This approach aims to make LLMs explicitly utilize structured medical knowledge during inference for more reliable responses.
Quick Start & Requirements
pip install -r requirements.txt
python infer.py --base_model 'BASE_MODEL_PATH' --lora_weights 'LORA_WEIGHTS_PATH' --use_lora True --instruct_dir 'INFER_DATA_PATH' --prompt_template 'TEMPLATE_PATH'
Highlighted Details
Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
6 months ago
Inactive