shibing624 / MedicalGPT

MedicalGPT: Training Your Own Medical GPT Model with ChatGPT Training Pipeline. 训练医疗大模型,实现了包括增量预训练(PT)、有监督微调(SFT)、RLHF、DPO、ORPO。
Apache License 2.0
3.24k stars 492 forks source link

关于merge模型的格式问题 #255

Closed tszslovewanpu closed 1 month ago

tszslovewanpu commented 11 months ago

Describe the Question

Please provide a clear and concise description of what the question is. 感谢分享工作! SFT训练还没结束时,我选了其中一个保存的checkpoint,使用merge_peft_adapter.py融合llama2-7B和这个lora model,但是最终融合的文件后缀是这样的model-00001-of-00002.safetensors,很奇怪,我想在这个融合模型基础上继续做SFT就不行了,不知道为何。。。

shibing624 commented 11 months ago

base_model.save_pretrained(output_dir, max_shard_size='10GB', safe_serialization=True) 改为 base_model.save_pretrained(output_dir, safe_serialization=False)

tszslovewanpu commented 11 months ago

感谢!