I have 2 gpus. And I want to train separate models on both of them. Which is why i need to move one model to cuda:1
How to set the training device to cuda:1 ? By default, TrainerArgument seems to move model to cuda:0
I figured this one out. All I had to do was set CUDA_VISIBLE_DEVICES = 1
and set device_map = "auto"
when loading the model.
1 Like
model.to(“cuda:1”) will also work.
This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.