Open putdoor opened 1 year ago
发生了:RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument mat2 in method wrapper_CUDA_mm)
model.load_state_dict(torch.load(peft_path), strict=False) model.eval()
添加了model.to('cuda') 解决了该问题。-> model.load_state_dict(torch.load(peft_path), strict=False) model.to('cuda') # add model.eval()
you save my life
发生了:RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument mat2 in method wrapper_CUDA_mm)
model.load_state_dict(torch.load(peft_path), strict=False) model.eval()
添加了model.to('cuda') 解决了该问题。-> model.load_state_dict(torch.load(peft_path), strict=False) model.to('cuda') # add model.eval()