neurdylab / learning-from-brains

Self-supervised learning techniques for neuroimaging data inspired by prominent learning frameworks in natural language processing + One of the broadest neuroimaging datasets used for pre-training to date.
0 stars 1 forks source link

model running on CPU #3

Open rgbayrak opened 9 months ago

rgbayrak commented 9 months ago

Make sure the models run on GPU

rgbayrak commented 8 months ago

Maybe this >> If you loaded your model on the CPU, make sure to move it to a GPU device first. Use the device_map parameter to specify where to place the model:

model = AutoModelForCausalLM.from_pretrained(model_id, device_map="cuda:0")