salesforce / CodeT5

Home of CodeT5: Open Code LLMs for Code Understanding and Generation
https://arxiv.org/abs/2305.07922
BSD 3-Clause "New" or "Revised" License
2.68k stars 394 forks source link

how to train on multy gpus #46

Closed NCCurry30 closed 2 years ago

NCCurry30 commented 2 years ago

can I train models on multy gpus? now I can train on only one gpu,cause the args is 'the index of gpu' which represent the index rather than the amount

yuewang-cuhk commented 2 years ago

For fine-tuning experiments, we only tested on one single GPU. The scripts should be easy to adapt into multi-GPU settings.

For this gpu index error, you may check whether it is due to that we set the visible GPU to be gpu:0 by default at here.

NCCurry30 commented 2 years ago

shoud I revise the code in run_gen.py , or how to input the param '--gpu' in run_exp.py I want to use two gpus but it erros with run_exp.py: error: argument --gpu: invalid int value: '1,2'