đ PULSE
PULSE is a model that supports various natural language processing tasks in the medical field, fine - tuned with a large amount of SFT data.
đ Quick Start
This README provides detailed information about the PULSE model, including its features, limitations, evaluation results, inference requirements, and usage examples.
⨠Features
- Large - scale Training: The PULSE model is further fine - tuned on the basis of the Bloom 7B model using approximately 4,000,000 SFT data from the medical and general domains.
- Comprehensive Medical NLP Tasks: PULSE supports a variety of natural language processing tasks in the medical field, including health education, physician exam questions, report interpretation, medical record structuring, and simulated diagnosis and treatment.
đĻ Installation
Hardware Requirements
The following table provides the GPU memory required for local deployment of PULSE for inference with a batch size of 1.
Property |
Details |
Quantization Level |
Memory for Loading Model |
FP16 |
14GB |
Steps
- Download the repository to your local/remote server.
git clone https://github.com/openmedlab/PULSE
cd PULSE
- Create a conda environment and install dependencies.
conda env create -f llm.yml
conda activate llm
It is not recommended to use versions of torch
and transformers
lower than the recommended versions.
đģ Usage Examples
Web Demo
Gradio
python web_demo_gradio.py
Command - line Demo
You can run cli_demo.py
in the repository to start a simple command - line demo:
python cli_demo.py
đ Documentation
Limitations
Due to the relatively small number of model parameters and the autoregressive generation paradigm, although the model provides inference results regarding disease diagnosis and treatment, these results cannot replace the advice and treatment plans of offline professional doctors. All responses are for reference only and should not be used as a basis for diagnosis or treatment. We strongly recommend that users seek the help and advice of professional doctors when they need to diagnose or treat diseases.
Elo Evaluation
model_name |
model_size |
ALL |
MedQA_Mainland |
PromptCBLUE |
webMedQA |
GPT4 |
220B*8(?) |
1195 |
1087 |
1134 |
1107 |
ChatGPT |
175B(?) |
1123 |
1053 |
1089 |
1067 |
PULSE_7b with prompt |
7B |
1074 |
1019 |
1047 |
1060 |
PULSE_14b |
14B |
1055 |
1001 |
1037 |
1056 |
PULSE_7b |
7B |
1054 |
1028 |
1037 |
1030 |
BianQue |
6B |
926 |
939 |
920 |
1011 |
QiZhenGPT |
13B |
918 |
949 |
935 |
974 |
Med - ChatGLM |
6B |
864 |
988 |
921 |
859 |
BenTsao |
7B |
846 |
966 |
913 |
859 |
DoctorGLM |
6B |
812 |
935 |
891 |
856 |
đ License
The code in this project is licensed under the Apache 2.0 license, and the model weights are licensed under the GNU AGPL 3.0 license. If the model and its modified versions in this project are used to provide services that generate misleading or harmful remarks and cause adverse effects, the service provider shall be responsible, and it has nothing to do with this project.
Acknowledgments
- Shanghai Artificial Intelligence Laboratory
- Qingyuan Research Institute, Shanghai Jiao Tong University
- Natural Language Processing and Big Data Mining Laboratory, East China University of Science and Technology
Open - Source Models
- [PULSE - 7bv5](https://huggingface.co/OpenMEDLab/PULSE - 7bv5)