Computers in Biology and Medicine 2024

MedChatZH

A Chinese medical consultation LLM fine-tuned from Baichuan-7B on traditional Chinese medicine (TCM) books and medical instruction dialogues — built to understand TCM-style questions in clinical Q&A.

Yang Tan, Zhixing Zhang, Mingchen Li, Fei Pan, Hao Duan, Zijie Huang, Hua Deng, Zhuohang Yu, Chen Yang, Guoyang Shen, Peng Qi, Chengyuan Yue, Yuxian Liu, Liang Hong, Huiqun Yu, Guisheng Fan, Yun Tang

MedChatZH overview: Chinese medical and TCM consultation LLM
MedChatZH adapts Baichuan-7B with TCM literature and large-scale medical instruction data for Chinese clinical dialogue.

What MedChatZH is

General-purpose Chinese LLMs often struggle with traditional Chinese medicine terminology, syndrome-style reasoning, and patient-facing consultation tone. MedChatZH starts from Baichuan-7B and continues training on TCM book corpora plus curated medical instruction dialogues so the model can answer Chinese medical questions — including TCM-oriented ones — in a conversational setting.

Weights, inference scripts, and a simple web interface are released with the GitHub repo; the 7B checkpoint lives on Hugging Face.

Data scale

From roughly 7M raw dialogues, the release keeps two cleaned instruction packs on Hugging Face Datasets:

  • 764k high-quality medical instruction dialogues
  • 2M mixed medical / general dialogues for broader conversational coverage

Together with TCM book text, these corpora supply both domain knowledge and instruction-following behavior for consultation-style generation.

Example dialogue

A short interactive exchange (from the project README):

User: 你好
MedChatZH: 你好,有什么我可以帮助你的吗?

User: 请问孩子肚子疼怎么办
MedChatZH: 如果孩子的疼痛不是很严重的话,您可以先观察一下他的症状。
如果他只是轻微的腹痛和腹泻,那么您可以给他喝些温水或者淡盐水来缓解不适感。
但是如果孩子的疼痛非常剧烈或持续时间较长,建议及时就医以确定病因并进行治疗。
同时,注意给孩子提供清淡易消化的食物,避免食用过于油腻、辛辣等刺激性食品。

The paper and README also report longer TCM-themed Q&A examples (alopecia, cerebral atrophy, adjunctive TCM for late-stage lung cancer, acne with constipation), illustrating how the model mixes lifestyle advice, classical formula names, and “see a clinician” caveats.

Usage

  • Quick chat: scripts/dialog.sh (edit generation settings in src/dialog.py)
  • Batch / scripted inference: scripts/inference.sh
  • Local web UI: scripts/interface.sh

Research-only license. The model, dataset, and derivatives are released for research purposes only — not for commercial use or other socially harmful applications. Outputs may be factually wrong, may fail to filter harmful instructions, and are not a substitute for professional medical advice. The project accepts no liability arising from use of the model or data.

Citation

If you use MedChatZH, please cite:

@article{tan2024medchatzh,
  title={MedChatZH: A tuning LLM for traditional Chinese medicine consultations},
  author={Tan, Yang and Zhang, Zhixing and Li, Mingchen and Pan, Fei and Duan, Hao and Huang, Zijie and Deng, Hua and Yu, Zhuohang and Yang, Chen and Shen, Guoyang and Qi, Peng and Yue, Chengyuan and Liu, Yuxian and Hong, Liang and Yu, Huiqun and Fan, Guisheng and Tang, Yun},
  journal={Computers in Biology and Medicine},
  volume={172},
  pages={108290},
  year={2024},
  publisher={Elsevier},
  doi={10.1016/j.compbiomed.2024.108290}
}