THUDM / ChatGLM2-6B

ChatGLM2-6B: An Open Bilingual Chat LLM | 开源双语对话语言模型
Other
15.71k stars 1.85k forks source link

[BUG/Help] 在ptuning中的main.py中,第130行model = model.half(),采用cpu加载,造成超内存报错 #619

Open zhuzongjian1 opened 11 months ago

zhuzongjian1 commented 11 months ago

Is there an existing issue for this?

Current Behavior

微信图片_20231106181633 进行chatglm2 ptuning时,sh train.sh超内存

Expected Behavior

No response

Steps To Reproduce

1、放入官方数据集 2、进入ptuning文件夹,vim train.sh 3、 image 增加RUNNING_STEP=400;修改model_path 4、sh train.sh

Environment

- OS:ubuntu1804
- Python:3.10
- Transformers:4.30.2
- PyTorch:2.1.0
- CUDA Support (`python -c "import torch; print(torch.cuda.is_available())"`) :True

Anything else?

No response

zhuzongjian1 commented 11 months ago

改成model = model.half().cuda()