Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cuda:3! (when checking argument for argument mat2 in method wrapper_CUDA_mm) #21

Open
orangezfj opened this issue Dec 30, 2023 · 1 comment

Comments

@orangezfj
Copy link

orangezfj commented Dec 30, 2023

Hello!
The calculation accuracy of QLora training is float16, what is the calculation accuracy of qa-lora training?
My fine-tuning TechGPT-7b was successful with QLora, but using qa-lora always reported the following error:

RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cuda:3! (when checking argument for argument mat2 in method wrapper_CUDA_mm)

Looking forward to your answers, this is very important to me。

@orangezfj orangezfj changed the title 请问使用qalora微调其他大模型,我用来微调TechGPT-7B,计算的数据类型是什么呀? RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cuda:3! (when checking argument for argument mat2 in method wrapper_CUDA_mm) Jan 2, 2024
@xxw11
Copy link
Collaborator

xxw11 commented Mar 13, 2024

Hi, it seems to be an error that occurs when running on multiple GPUs. You can resolve this issue by simply specifying the visible devices before your run script, using CUDA_VISIBLE_DEVICES, for example:
CUDA_VISIBLE_DEVICES=0 python qalora.py --model_path

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants