THUDM / ChatGLM3

ChatGLM3 series: Open Bilingual Chat LLMs | 开源双语对话语言模型
Apache License 2.0
13.33k stars 1.55k forks source link

AttributeError: 'ChatGLMForConditionalGeneration' object has no attribute 'save_checkpoint' #1293

Closed Solenyalyl closed 1 week ago

Solenyalyl commented 1 month ago

System Info / 系統信息

微调报错: 在直接使用finetune_hf.py与 lora.yaml进行微调没有问题,在lora.yaml中将注释掉的ds_zero_2.json使用上,则出现报错 AttributeError: 'ChatGLMForConditionalGeneration' object has no attribute 'save_checkpoint'

Who can help? / 谁可以帮助到您?

@Btlmd

Information / 问题信息

Reproduction / 复现过程

CUDA_VISIBLE_DEVICES=0 NCCL_P2P_DISABLE="1" NCCL_IB_DISABLE="1" python ./finetune_demo/finetune_hf.py /chatglm3-6b/data/ ./chatglm3-6b ./finetune_demo/configs/lora.yaml

Expected behavior / 期待表现

在使用上ds_zero_2.json之后,可以进行微调

Dagoli commented 1 month ago

请问问题解决了吗?

Dagoli commented 1 month ago

试了下用多卡的命令改成单卡就可以了,调用的deepspeedEngine.save_checkpoint