Hugging Face Forums
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:2 and cuda:0! (when checking argument for argument index in method wrapper_CUDA__index_select)
🤗Transformers
DeepSpeed
Kason123
January 12, 2024, 4:07pm
4
Did you figure out a workaround for this issue?
1 Like
show post in topic
Related topics
Topic
Replies
Views
Activity
Fine tune "meta-llama/Llama-2-7b-hf" Bug: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)
Beginners
15
117
December 6, 2024
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!
🤗Accelerate
1
689
May 31, 2024
Got "Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cuda:1!" on my custom model
Beginners
3
26
February 17, 2025
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! I am on a single T4 GPU
🤗Accelerate
6
1001
June 10, 2024
Trainer.train throws RuntimeError: Expected all tensors to be on the same device
Beginners
5
3198
May 17, 2023