ChatDoctor is participating 2021 OSC China Open Source Project Selection , please vote for it!
ChatDoctor is in 2021 OSC China Open Source Project Selection {{projectVoteCount} has been obtained in, please vote for it!
2021 OSC China Open Source Project Selection It is in hot progress. Come and vote for your favorite open source project!
2021 OSC China Open Source Project Selection>>> Midfield Review
ChatDoctor won the 2021 OSC China Open Source Project Selection "The Best Popularity Project" !
Authorization Agreement Apache 2.0
development language Python
operating system Cross platform
Software type Open source software
Open source organizations nothing
region domestic
deliverer Rocky
intended for unknown
Recording time 2023-03-31

Software Introduction

ChatDoctor is a medical chat model that uses medical knowledge to fine tune the LLaMA model.

Note: The model has not yet achieved 100% accurate output, please do not apply it to the real clinical scene.

Demo Page:   https://huggingface.co/spaces/ChatDoctor/ChatDoctor  

Training resource list

The creative members come from the following four schools

  • University of Texas Southwestern Medical Center, Dallas, USA
  • University of Illinois at Champaign, Urbana, USA
  • Ohio State University, Columbus, USA
  • Hangzhou University of Electronic Science and Technology, Hangzhou, China

Operational Guidelines

In the conda environment with pytorch, run:

 pip install -r requirements.txt

How to fine tune

 torchrun --nproc_per_node=4 --master_port=<your_random_port> train.py \ --model_name_or_path <your_path_to_hf_converted_llama_ckpt_and_tokenizer> \ --data_path ./ HealthCareMagic-200k.json \ --bf16 True \ --output_dir pretrained \ --num_train_epochs 3 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --gradient_accumulation_steps 8 \ --evaluation_strategy "no" \ --save_strategy "steps" \ --save_steps 2000 \ --save_total_limit 1 \ --learning_rate 2e-5 \ --weight_decay 0. \ --warmup_ratio 0.03 \ --lr_scheduler_type "cosine" \ --logging_steps 1 \ --fsdp "full_shard auto_wrap" \ --fsdp_transformer_layer_cls_to_wrap 'LLaMADecoderLayer' \ --tf32 True
Expand to read the full text

code

Gitee index of is
exceed Items for

comment

Click to lead the topic 📣 Post and join the discussion 🔥
No content temporarily
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
No more
No content temporarily
Issued a question and answer
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
No more
No content temporarily
No content temporarily
zero comment
ten Collection
 OSCHINA
Log in to view more high-quality content
 Back to top
Top