CMLM-ZhongJing: Bridging Ancient Wisdom with Modern Technology
Inspired by the profound knowledge of the ancient Chinese physician Zhang Zhongjing, the CMLM-ZhongJing project endeavors to elucidate the extensive knowledge embodied in traditional Chinese medicine. It harmonizes ancient wisdom with modern technological innovation to deliver a reliable and professional tool for the medical domain. However, it is crucial to note that all generated outcomes are meant for reference only and should be validated by experienced professionals for diagnostic and therapeutic purposes.
Training and Inference Highlights
The project has released fine-tuned weights for the Baichuan2-13B-Chat and Qwen1.5-1.8B-Chat models, where the 1.8B model facilitates fast inference on a single Tesla T4 GPU. These weights, refined through multiple iterative training sessions using proprietary medical datasets, enhance the model's comprehension and generation capabilities specific to the domain of Chinese medicine. These weights are available for download on the Huggingface platform.
Version | Parameters | Base Model | Download Link |
---|---|---|---|
ZhongjingGPT1_13B | 13B | Baichuan2-13B-Chat | ZhongjingGPT1_13B |
ZhongJing-2-1_8b | 1.8B | Qwen1.5-1.8B-Chat | ZhongJing-2-1_8b |
For users wishing to perform free GPU inference with the 1.8B model, an Open In Colab link is available.
Demonstrations and Applications
A web-based demo powered by Gradio, allowing both single-round and multi-round dialogue using ZhongJing, is available for local deployment. Users can launch the web demo by running the following command after cloning the repository:
python WebDemo.py
Development of Instruction Data
1. Multi-Task Diagnostic Instruction Construction
The construction of diverse and insightful instruction data is akin to how humans encode knowledge—through situations and stories, drawing on the capabilities of language models to enhance learning and comprehension. This project employs structured professional templates and specific prompts to generate rich narratives, diagnostic analyses, and treatment patterns across 15 distinct scenarios, thus improving the model's reasoning on Chinese medical data.
Here’s an example of an instruction:
{
"instruction": "I'm curious about the entire process of San Yuan Decoction. Can you give me a detailed introduction from a brief, medical history, symptoms, diagnosis and treatment, and result discussion?",
"input": "",
"output": "San Yuan Decoction is an ancient Chinese prescription first appearing in Bao Ming Ji. It's composed of various herbs and mainly used for postpartum prolonged fatigue with symptoms like floating and rapid pulse…"
}
2. Basic Chinese Medicine Knowledge Instructions
In addition to strategies focused on professional and critical understanding, more foundational Chinese medicine content instructions—extracted from ancient texts, symptom synonyms, antonyms, and syndrome terminologies—are incorporated. This data encompasses approximately 80,000 entries to enhance overall knowledge representation.
Model Performance Evaluation
The effectiveness of the model is evaluated using high-level medical cases from prominent Chinese medical practitioners. The results have shown that CMLM-ZhongJing demonstrates excellent generalization capabilities, outperforming prominent language models like Wenxin Yiyan and Xinghuo in specific datasets geared towards diversified diagnostic decompositions. This further attests to the learning of metaphorical knowledge and logic, supporting advanced reasoning across varied formats.
Here is a comparison table illustrating the model's capability to respond to complex queries:
Sequence | Query | Wenxin Yiyan | Xinghuo Recognizer | ZhongJing (384 Tokens) | ZhongJing (512 Tokens) |
---|---|---|---|---|---|
1 | Patient Case | Diagnosis and advice given | Diagnosis and treatment plan generated | [Detailed response on diagnosis and prescription] | [Extended response with additional analysis] |
Incorporating traditional knowledge into a modern, efficient framework let us explore sophisticated interactions between ancient medicinal wisdom and contemporary technological advancements. CMLM-ZhongJing not only aims at creating a bridge between ages-old practices and new-age technologies but also sets a new precedent for digital explorations in the field of traditional medicine.