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

Significant performance drop of ILQL when using multi-GPU training #112

Closed
mcao516 opened this issue Nov 25, 2022 · 2 comments
Closed

Significant performance drop of ILQL when using multi-GPU training #112

mcao516 opened this issue Nov 25, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@mcao516
Copy link

mcao516 commented Nov 25, 2022

🐛 Describe the bug

I was running experiments using the ILQL sentiment example code. When using a single A100 GPU, I got an evaluation score of 0.9286 after 1k steps of training. However, when I switched to multi-GPU training (2 A100s), after 1000 steps, I got a score of 0.692. I use the Huggingface accelerate. All hyper-parameters are the same. Any idea why this happens?

Multi-GPU training command:
accelerate launch --config_file accelerator_config.yaml examples/ilql_sentiments.py

Which trlX version are you using?

trlX==0.3.0

Additional system and package information

pytorch==1.13.0+cu116

@mcao516 mcao516 added the bug Something isn't working label Nov 25, 2022
@LouisCastricato
Copy link
Contributor

Ouch, I'll have one of our engineers look into this Monday. Thanks. @reciprocated

@maxreciprocate
Copy link
Collaborator

Hi, the random seed wasn't seeding additional gpus properly, it was corrected with

Thanks for pointing this out and thanks Jon for fixing it!

https://wandb.ai/sorry/public/reports/Difference-between-seeds--VmlldzozMDQ5MDgy

The only difference in runs with the same config.yml on variable number of gpus is a different total batch_size (this variable functions as a micro batch size in the config). Accounting for that and dividing it by 4 for 4 gpus (128/4=32 batch_size) would give same curves:

https://wandb.ai/sorry/public/reports/Difference-between-num_gpus--VmlldzozMDQ5MjUw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants