THUDM / ChatGLM3

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

微调中途报错BatchEncoding.to() got an unexpected keyword argument 'non_blocking' #1270

Closed lmdegit closed 1 month ago

lmdegit commented 1 month ago

System Info / 系統信息

python 版本3.12 nvcc --version nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2023 NVIDIA Corporation Built on Mon_Apr__3_17:16:06_PDT_2023 Cuda compilation tools, release 12.1, V12.1.105 Build cuda_12.1.r12.1/compiler.32688072_0

pytorch版本2.3.0

租用的autodl服务器

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

No response

Information / 问题信息

Reproduction / 复现过程

按照notebook运行微调命令 CUDA_VISIBLE_DEVICES=0 NCCL_P2P_DISABLE="1" NCCL_IB_DISABLE="1" python finetune_hf.py data/AdvertiseGen_fix /media/zr/Data/Models/LLM/chatglm3-6b configs/lora.yaml

Expected behavior / 期待表现

在中途报错如图 ![Uploading Snipaste_2024-06-18_14-06-48.jpg…]()

lmdegit commented 1 month ago

上面图片传失败了,看这个

Snipaste_2024-06-18_14-06-48

Snipaste_2024-06-18_14-33-59

Renyh0 commented 1 month ago

我在对ChatGLM4进行Lora微调时也出现了这个问题,我在https://github.com/THUDM/ChatGLM3/issues/1237这里找到了解决方法,将transformers从4.41.1降到4.40.0就可以解决了!