├── .gitignore ├── README.md ├── data └── .gitkeep ├── peft ├── __init__.py ├── import_utils.py ├── mapping.py ├── peft_model.py ├── tuners │ ├── __init__.py │ ├── adalora.py │ ├── adaption_prompt.py │ ├── lora.py │ ├── p_tuning.py │ ├── prefix_tuning.py │ └── prompt_tuning.py └── utils │ ├── __init__.py │ ├── config.py │ ├── other.py │ └── save_and_load.py ├── pics └── ChatMed.png ├── requirements.txt ├── resources ├── ChatMed-Consult_llama_lora_pt_v0 │ ├── adapter_config.json │ └── adapter_model.bin └── chinese-llama-alpaca-plus-lora-7b │ └── .gitkeep └── src ├── chatmed_llama_peft ├── LlaMA-7b模型准备.md ├── deepspeed_config_zero3_offload.json ├── merge_llama_with_chinese_lora.py ├── run_clm_pt_with_peft.py └── run_train.sh └── web_services ├── gradio_demo.py ├── test_examples └── ChatMed-Consult_test.json ├── web_service.py ├── web_service_simple.py └── web_service_test.py /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-wzhu/ChatMed/HEAD/.gitignore -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-wzhu/ChatMed/HEAD/README.md -------------------------------------------------------------------------------- /data/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /peft/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-wzhu/ChatMed/HEAD/peft/__init__.py -------------------------------------------------------------------------------- /peft/import_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-wzhu/ChatMed/HEAD/peft/import_utils.py -------------------------------------------------------------------------------- /peft/mapping.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-wzhu/ChatMed/HEAD/peft/mapping.py -------------------------------------------------------------------------------- /peft/peft_model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-wzhu/ChatMed/HEAD/peft/peft_model.py -------------------------------------------------------------------------------- /peft/tuners/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-wzhu/ChatMed/HEAD/peft/tuners/__init__.py -------------------------------------------------------------------------------- /peft/tuners/adalora.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-wzhu/ChatMed/HEAD/peft/tuners/adalora.py -------------------------------------------------------------------------------- /peft/tuners/adaption_prompt.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-wzhu/ChatMed/HEAD/peft/tuners/adaption_prompt.py -------------------------------------------------------------------------------- /peft/tuners/lora.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-wzhu/ChatMed/HEAD/peft/tuners/lora.py -------------------------------------------------------------------------------- /peft/tuners/p_tuning.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-wzhu/ChatMed/HEAD/peft/tuners/p_tuning.py -------------------------------------------------------------------------------- /peft/tuners/prefix_tuning.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-wzhu/ChatMed/HEAD/peft/tuners/prefix_tuning.py -------------------------------------------------------------------------------- /peft/tuners/prompt_tuning.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-wzhu/ChatMed/HEAD/peft/tuners/prompt_tuning.py -------------------------------------------------------------------------------- /peft/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-wzhu/ChatMed/HEAD/peft/utils/__init__.py -------------------------------------------------------------------------------- /peft/utils/config.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-wzhu/ChatMed/HEAD/peft/utils/config.py -------------------------------------------------------------------------------- /peft/utils/other.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-wzhu/ChatMed/HEAD/peft/utils/other.py -------------------------------------------------------------------------------- /peft/utils/save_and_load.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-wzhu/ChatMed/HEAD/peft/utils/save_and_load.py -------------------------------------------------------------------------------- /pics/ChatMed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-wzhu/ChatMed/HEAD/pics/ChatMed.png -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-wzhu/ChatMed/HEAD/requirements.txt -------------------------------------------------------------------------------- /resources/ChatMed-Consult_llama_lora_pt_v0/adapter_config.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-wzhu/ChatMed/HEAD/resources/ChatMed-Consult_llama_lora_pt_v0/adapter_config.json -------------------------------------------------------------------------------- /resources/ChatMed-Consult_llama_lora_pt_v0/adapter_model.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-wzhu/ChatMed/HEAD/resources/ChatMed-Consult_llama_lora_pt_v0/adapter_model.bin -------------------------------------------------------------------------------- /resources/chinese-llama-alpaca-plus-lora-7b/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/chatmed_llama_peft/LlaMA-7b模型准备.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-wzhu/ChatMed/HEAD/src/chatmed_llama_peft/LlaMA-7b模型准备.md -------------------------------------------------------------------------------- /src/chatmed_llama_peft/deepspeed_config_zero3_offload.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-wzhu/ChatMed/HEAD/src/chatmed_llama_peft/deepspeed_config_zero3_offload.json -------------------------------------------------------------------------------- /src/chatmed_llama_peft/merge_llama_with_chinese_lora.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-wzhu/ChatMed/HEAD/src/chatmed_llama_peft/merge_llama_with_chinese_lora.py -------------------------------------------------------------------------------- /src/chatmed_llama_peft/run_clm_pt_with_peft.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-wzhu/ChatMed/HEAD/src/chatmed_llama_peft/run_clm_pt_with_peft.py -------------------------------------------------------------------------------- /src/chatmed_llama_peft/run_train.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-wzhu/ChatMed/HEAD/src/chatmed_llama_peft/run_train.sh -------------------------------------------------------------------------------- /src/web_services/gradio_demo.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-wzhu/ChatMed/HEAD/src/web_services/gradio_demo.py -------------------------------------------------------------------------------- /src/web_services/test_examples/ChatMed-Consult_test.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-wzhu/ChatMed/HEAD/src/web_services/test_examples/ChatMed-Consult_test.json -------------------------------------------------------------------------------- /src/web_services/web_service.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-wzhu/ChatMed/HEAD/src/web_services/web_service.py -------------------------------------------------------------------------------- /src/web_services/web_service_simple.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-wzhu/ChatMed/HEAD/src/web_services/web_service_simple.py -------------------------------------------------------------------------------- /src/web_services/web_service_test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-wzhu/ChatMed/HEAD/src/web_services/web_service_test.py --------------------------------------------------------------------------------