ChatGLM-Tuning icon indicating copy to clipboard operation
ChatGLM-Tuning copied to clipboard

RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cuda:1!

Open hjunjie0324 opened this issue 1 year ago • 3 comments

企业微信截图_70edc12c-c62c-4b33-966a-967d16c6ba01

进行fine-tuning的时候报这个错,请问该怎么解决

hjunjie0324 avatar Mar 29 '23 08:03 hjunjie0324

把模型和数据都扔到cuda: 0

huangtao36 avatar Mar 30 '23 02:03 huangtao36

把模型和数据都扔到cuda: 0

请问怎么样才能指定单个cuda啊,设置了os.environ["CUDA_VISIBLE_DEVICES"] = "0",好像没啥用

hjunjie0324 avatar Mar 30 '23 08:03 hjunjie0324

把模型和数据都扔到cuda: 0

请问怎么样才能指定单个cuda啊,设置了os.environ["CUDA_VISIBLE_DEVICES"] = "0",好像没啥用

CUDA_VISIBLE_DEVICES=0

fengmy avatar Apr 07 '23 09:04 fengmy