-
Notifications
You must be signed in to change notification settings - Fork 524
Use all gpus available for training #293
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -31,7 +31,7 @@ | |||||
| save_interval = 1000 | ||||||
| eval_iters = 100 | ||||||
| log_interval = 100 | ||||||
| devices = 4 | ||||||
| devices = torch.cuda.device_count() | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| # Hyperparameters | ||||||
| learning_rate = 3e-5 | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -50,7 +50,8 @@ def main( | |||||||
| out_dir: str = "out/lora/alpaca", | ||||||||
| ): | ||||||||
|
|
||||||||
| fabric = L.Fabric(accelerator="cuda", devices=1, precision="bf16-true") | ||||||||
| devices = torch.cuda.device_count() | ||||||||
| fabric = L.Fabric(accelerator="cuda", devices=devices, precision="bf16-true") | ||||||||
|
Comment on lines
+53
to
+54
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Abecid Did multi-gpu training work with this script and how many did you use? Is the loss convergence comparable to single gpu training? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i ran this with two NVIDIA Tesla T4 cards with
|
||||||||
| fabric.launch() | ||||||||
| fabric.seed_everything(1337 + fabric.global_rank) | ||||||||
|
|
||||||||
|
|
||||||||
Uh oh!
There was an error while loading. Please reload this page.