CUDA_VISIBLE_DEVICES=0 python finetune_lora.py
train.sh脚本去掉CUDA_VISIBLE_DEVICES=0就会报以下的错误
return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cuda:1! (when checking argument for argument index in method wrapper_CUDA__index_select)
CUDA_VISIBLE_DEVICES=0 python finetune_lora.py train.sh脚本去掉CUDA_VISIBLE_DEVICES=0就会报以下的错误 return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse) RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cuda:1! (when checking argument for argument index in method wrapper_CUDA__index_select)
加上CUDA_VISIBLE_DEVICES=0就只能单卡跑了,要多卡不报错请问要怎么改一下呢