Thank you for the response! I have tried model.to(‘cuda:0’) before and I have checked nvidia-smi. One of my GPU gets used, but that has never run my python files. What I have not been able to check is CUDA under task manager. My task manager always has GPU usage under 1% and whatever it is using for is not python.  All of my python files run on CPU. My naive assumption is that my notebook recognizes that GPU is installed. But when it comes to running the model on one of the GPUs, it does not do that. model.to(“cuda:0”), and torch.cuda.set_device(“cuda”) does not work to make that happen.  torch.cuda.set_device(“cuda”)  doesn’t throw any error. But model.to(“cuda:0”) throws error that says “‘QuestionAnsweringModel’ object has no attribute ‘to’”. So I need to find a workaround for this.

Screen Shot 2022-01-18 at 2.39.52 PM920×481 152 KB