This repository contains the DISC-MedLLM, version of Baichuan-13b-base as the base model.
Please note that due to the ongoing development of the project, the model weights in this repository may differ from those in our currently deployed demo.
The DISC-MedLLM is a large-scale domain-specific model designed for conversational healthcare scenarios. It can address a variety of your needs, including medical consultations and treatment inquiries, offering you high-quality health support services.
The DISC-MedLLM effectively bridges the gap between general language models and real-world medical consultations, as evidenced by experimental results.
Owing to our goal-oriented strategy and the framework that integrates both LLM and Human in the loop based on real-world doctor-patient dialogues and knowledge graphs, DISC-MedLLM boasts several features:
Knowledge-intensive and reliable
Ability of multi-turn inquiry
Alignment with human preferences
Dataset
To train DISC-MedLLM, we construct a high-quality dataset called DISC-Med-SFT consisting of over 470k distinct examples derived from existing medical datasets. We adopt a goal-oriented strategy by selectively reconstructing the dataset using a few deliberately chosen sources. These data sources serve the purpose of assisting LLMs in acquiring medical domain knowledge, aligning behavioral patterns with human preferences, and capturing real-world online medical dialogue distributions.
Dateset
Original Source
Size
Re-constructed AI Doctor-Patient Dialogue
MedDialog
400k
cMedQA2
20k
Knowledge Graph QA pairs
CMeKG
50k
Behavior Preference Dataset
Manual selection
2k
Others
MedMCQA
8k
MOSS-SFT
33k
Alpaca-GPT4-zh
1k
Deploy
The current version of DISC-MedLLM is derived from the Baichuan-13B-Base. You can directly download our model weights from the HuggingFace repository, or automatically obtain them through the demo code.
Additionally, since the current version uses Baichuan as the base model, you can refer to its repo for deploying with int8, int4 quantized inference. However, using quantized deployment will result in performance degradation.
Training
You can fine-tuning our model using the data same as our data schema.
Our train code is derived from Firefly with the different data schema and dialogue format. We jsut provide the code of Full Params Fine-tuning:
The user_token and assistant_token we used are 195 and 196, respectly. Which is same as Baichuan-13b-Chat.
Delcaration
Due to the inherent limitations of language models, we cannot assure the accuracy or reliability of information generated by this model. This model is designed exclusively for research and testing by individuals and academic groups. We urge users to critically assess any information or medical advice obtained through the model's output. Blindly trusting or following such information is strongly discouraged. We disclaim responsibility for any issues, risks, or adverse consequences resulting from the model's use.
Licenses
The use of the source code in this repository complies with the Apache 2.0 License.
Citation
angular2
1@misc{bao2023discmedllm,
2 title={DISC-MedLLM: Bridging General Large Language Models and Real-World Medical Consultation},
3 author={Zhijie Bao and Wei Chen and Shengze Xiao and Kuang Ren and Jiaao Wu and Cheng Zhong and Jiajie Peng and Xuanjing Huang and Zhongyu Wei},
4 year={2023},
5 eprint={2308.14346},
6 archivePrefix={arXiv},
7 primaryClass={cs.CL}
8}