TCMLLM  by 2020MEAI

LLM for Traditional Chinese Medicine clinical support

Created 2 years ago
250 stars

Top 100.0% on SourcePulse

GitHubView on GitHub
Project Summary

This project addresses the need for intelligent assistance in Traditional Chinese Medicine (TCM) clinical practice, specifically for syndrome diagnosis and prescription recommendation, by leveraging large language models. It aims to accelerate advancements in TCM knowledge Q&A and clinical decision support for practitioners and researchers.

How It Works

The project introduces TCMLLM-PR, a large language model fine-tuned for TCM prescription recommendation. It utilizes instruction fine-tuning on the ChatGLM base model, trained on a custom dataset comprising 68,000 data entries (10 million tokens). This dataset integrates diverse sources including real-world clinical cases, classic medical texts, and textbooks, enabling the model to generate relevant prescriptions based on patient symptoms.

Quick Start & Requirements

To get started, users must first download the ChatGLM-6B original model code and parameters, then configure the dependency environment. Subsequently, download the TCMLLM model parameters and extract them into the ChatGLM-6B/ptuning/ directory. Data examples from the project's data/ folder should be placed in ptuning/, along with the TCMLLM_output_demo.py script. Configuration of file and data paths within the script is necessary for batch testing.

  • Primary Install/Run: Requires downloading base ChatGLM-6B model and TCMLLM parameters, then running a provided Python script.
  • Prerequisites: ChatGLM-6B model, Python environment. Training details suggest significant GPU resources (e.g., 2x 3090 GPUs).
  • Links:

Highlighted Details

  • Comprehensive Dataset: The instruction-tuning dataset includes 68k entries from 8 sources: 4 TCM textbooks (ISGP), Chinese Pharmacopoeia (CHP), classic clinical cases (CMCC), and 5 hospital datasets covering diseases like Lung, Stroke, Diabetes, Liver, and Spleen/Stomach (SSD).
  • Performance Benchmarks: TCMLLM-PR demonstrates competitive performance, particularly excelling on the ISGP dataset (F1@5: 0.5283) and showing strong results on the CHP dataset (F1@5: 0.2642) compared to baseline methods (PTM, TCMPR) and other LLMs like ChatGPT and Tongyi Qianwen.
  • Training Efficiency: The model was successfully trained on two NVIDIA 3090 GPUs (24GB VRAM each), with inference requiring approximately 14GB of VRAM.

Maintenance & Community

This project was developed by the Medical Intelligence Team at Beijing Jiaotong University. Key contributors include Tian Haoyu, Dong Xin, Xu Kuan, Hua Rui, Zhao Chenxi, Wang Hongyan, Ye Mingwei, and Hu Minjie, with project leadership from Yang Kuo and Zhou Xuezhong. The project acknowledges contributions from cooperating units that provided medical data. No specific community channels (e.g., Discord, Slack) are listed.

Licensing & Compatibility

The project explicitly states that its resources are for academic research only and strictly prohibited for commercial use. It also requires adherence to the licenses of its dependencies (ChatGLM-6B, LLaMA, etc.). Compatibility for commercial applications or integration into closed-source systems is not supported due to the non-commercial license and data generation caveats.

Limitations & Caveats

The dataset is largely model-generated and should not be used for actual medical diagnosis. The accuracy of model outputs is not guaranteed due to inherent LLM limitations. The project disclaims all legal liability for any use or consequences arising from the model's outputs or resources. Commercial use is strictly forbidden.

Health Check
Last Commit

1 year ago

Responsiveness

Inactive

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

Explore Similar Projects

Feedback? Help us improve.