ShenNong-TCM-LLM  by michael-wzhu

TCM LLM for traditional Chinese medicine (TCM) knowledge and consultation

created 2 years ago
404 stars

Top 72.9% on sourcepulse

GitHubView on GitHub
Project Summary

ShenNong-TCM is a large language model specifically designed for Traditional Chinese Medicine (TCM). It aims to enhance LLMs' knowledge and capabilities in TCM, enabling them to provide more informed responses to medical inquiries and support the inheritance of TCM knowledge. The project is targeted at researchers and developers interested in applying LLMs to specialized medical domains.

How It Works

ShenNong-TCM is built upon the LLaMA base model and fine-tuned using the ShenNong_TCM_Dataset. This dataset was created using an "entity-centric self-instruct" method, focusing on core TCM entities and various intent scenarios. The method leverages ChatGPT to generate over 110,000 instruction-following data points related to TCM, derived from an open-source TCM knowledge graph. This approach allows for efficient and targeted fine-tuning, resulting in improved TCM-specific performance.

Quick Start & Requirements

  • To fine-tune models using the dataset, refer to the ChatMed codebase.
  • For custom entity-centric self-instruct, run: python src/entity_centric_self_instruct.py your_KG_triples.txt your_output_file.jsonl.
  • Requires API key configuration for self-instruct.
  • Dataset: ShenNong_TCM_Dataset (v0.2, 110k+ entries).
  • Model checkpoints are available on model.

Highlighted Details

  • Fine-tuned on LLaMA-7b with LoRA (rank=16).
  • Dataset generated via an entity-centric self-instruct method using ChatGPT.
  • Demonstrates improved, more empathetic, and detailed responses compared to base LLaMA models in TCM contexts.
  • Part of a broader initiative including ChatMed-Consult, ChatMed-MT, and PromptCBLUE for medical NLP evaluation.

Maintenance & Community

  • The project is actively iterating, with regular model weight updates.
  • A WeChat group is available for technical exchange (QR code valid until June 23rd).
  • Related projects: ChatMed-LLM.

Licensing & Compatibility

  • Disclaimer: Resources are for academic research only; commercial use is strictly prohibited.
  • The model is not a substitute for professional medical diagnosis or advice.

Limitations & Caveats

The project acknowledges that the TCM knowledge within the models is limited by the quality and quantity of the training data and is subject to ongoing improvement. The models are not intended for medical diagnosis or advice.

Health Check
Last commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
32 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.