THUDM / ChatGLM3

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

AttributeError: 'NoneType' object has no attribute 'peft_type' #1224

Closed liuqi8827 closed 2 months ago

liuqi8827 commented 2 months ago

System Info / 系統信息

ubuntu

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

@Btlmd

Information / 问题信息

Reproduction / 复现过程

  1. OMP_NUM_THREADS=1 torchrun --standalone --nnodes=1 --nproc_per_node=8 finetune_hf.py data/AdvertiseGen/ /workspace/xxx/models/chatglm3-6b configs/sft.yaml configs/ds_zero_3.json
  2. image
  3. image

Expected behavior / 期待表现

正常训练

zRzRzRzRzRzRzR commented 2 months ago

这不是模型没读入成功吗

image
liuqi8827 commented 2 months ago

感谢回复

  1. 我要做SFT,所以把代码改成如下图所示,代码可以正常运行

    image
  2. 但是一直会报OutOfMemoryError: CUDA out of memory.的错误

    image image image image image
  3. 计算资源如下图,运行时已经设置为--nproc_per_node=8:

    image
  4. 使用的是官方代码和官方给的数据集

  5. sft.yaml配置如下:

    image
  6. ds_zero_2.json配置如下:

    image
  7. ds_zero_3.json配置如下:

    image
  8. 无论使用ds_zero_2.json还是ds_zero_3.json,dou都会报OutOfMemoryError: CUDA out of memory.的错误

zRzRzRzRzRzRzR commented 2 months ago

已经解决