HuggingFace offers training_args like below. When I use HF trainer to train my model, I found cuda:0 is used by default.
I went through the HuggingFace Docs, but still don't know how to specify which GPU to run on when using HF trainer.
training_args = TrainingArguments(
output_dir='./results', # output directory
num_train_epochs=3, # total # of training epochs
per_device_train_batch_size=16, # batch size per device during training
per_device_eval_batch_size=64, # batch size for evaluation
warmup_steps=500, # number of warmup steps for learning rate scheduler
weight_decay=0.01, # strength of weight decay
logging_dir='./logs', # directory for storing logs
)