Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What to change for training on two T4 GPUs ? #539

Open
noorchauhan opened this issue Jul 27, 2024 · 1 comment
Open

What to change for training on two T4 GPUs ? #539

noorchauhan opened this issue Jul 27, 2024 · 1 comment

Comments

@noorchauhan
Copy link

Hie, I am new to transformers and cuda, How can I change to use two GPUs as I have two T4 GPUs and I want to split the training across the two GPUs?

@bawsi99
Copy link

bawsi99 commented Aug 1, 2024

$ torchrun --standalone --nproc_per_node=2 train.py( for running the get file , follow this with config/train_gpt2.py, for training gpt2) run the file with this command , adjust the "nproc_per_node" parameter , for the number of gpus. the code uses ddp to split the training based on the number of gpus . assuming number of nodes is 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants