-
Notifications
You must be signed in to change notification settings - Fork 534
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
Get LoRA script to work for single gpus #35
base: master
Are you sure you want to change the base?
Conversation
I added an additional boolean parameter to the script that represents whether to use a single gpu or not. |
train/base.py
Outdated
def save_checkpoints(self, models: Models, optimizers: Optimizers, suffix=None): | ||
barrier() | ||
def save_checkpoints(self, models: Models, optimizers: Optimizers, suffix=None, single_gpu=False): | ||
if single_gpu: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be 'if not single_gpu:'?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's fixed in this commit.
c00a449
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works great for me, good job
This is my first pull request in 7 yrs or something so apologies in advance if I do anything wrong.
Currently, train_c_lora.py does not support training with single GPUs as doing so will fail with missing environment variables or calls to
torch.distributed.barrier()
which (I think) is supposed to only work in multi-gpu environments.(e.g.) #28 #17
This pull request will will make some modifications to add single gpu support.