-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Merge the final LoRA finetuned checkpoint #1081
Conversation
Nice! In this case, we can now also simplify the docs right? I.e., at https://github.com/Lightning-AI/litgpt/blob/wip/tutorials/finetune_lora.md#merging-lora-weights |
@rasbt Yes it's a nice improvement. But I need to be a bit careful here. Right now, merging a model requires it to fit into CPU RAM. For the 70B models, that could potentially be a problem on consumer hardware. I think it would be smarter to first implement sequential merging + sequential write (the latter we have already in LitGPT). That's why the PR is still in DRAFT. |
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 changed my mind. I think it would be good and safe to do this because the manual merging logic is the same. I also used this branch in my finetuning Studio.
@rasbt Yes. It would simplify in the sense that we could immediately suggest the user to run generate or chat. |
Do you want to do this in this PR? |
@rasbt I simplified the merging section based on the changes in this PR. Would you like to review it and edit if necessary? |
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.
This is nice! Just a few minor suggestions below.
Co-authored-by: Sebastian Raschka <[email protected]>
Co-authored-by: Carlos Mocholí <[email protected]>
Co-authored-by: Sebastian Raschka <[email protected]> Co-authored-by: Carlos Mocholí <[email protected]>
Co-authored-by: Sebastian Raschka <[email protected]> Co-authored-by: Carlos Mocholí <[email protected]>
Co-authored-by: Sebastian Raschka <[email protected]> Co-authored-by: Carlos Mocholí <[email protected]>
Co-authored-by: Sebastian Raschka <[email protected]> Co-authored-by: Carlos Mocholí <[email protected]>
Merges the final checkpoint saved by the
lora.py
finetuning script.