yuanzhoulvpi2017 / zero_nlp

中文nlp解决方案(大模型、数据、模型、训练、推理)
MIT License
3.03k stars 368 forks source link

chatglm6b_v2 单机多卡训练found at least two devices, cuda:1 and cuda:0! #139

Open amwork2020 opened 1 year ago

amwork2020 commented 1 year ago

在3090 24G内存运行chatglm2啥也没改报 如下错误: RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:1 and cuda:0! (when checking argument for argument target in method wrapper_CUDA_nll_loss_forward)

yuanzhoulvpi2017 commented 1 year ago

请务必查看我的readme.md里面的07-17日里面写的【注意】⚠️ 截屏2023-07-21 16 13 51

yuanzhoulvpi2017 commented 1 year ago

如果代码也该好了,依然有这个问题。你再检查一下transformers的版本,建议安装最新版本pip install transformers

amwork2020 commented 1 year ago

@yuanzhoulvpi2017 ok了,谢谢!

wuxiulike commented 1 year ago

同谢,已解决报错

SWORD-ZEUS commented 1 year ago

改了代码,同时也升级了transformers,为啥还是出现这个问题呢