[peft] Add support for LoRA merge#418
Closed
ananthsub wants to merge 7 commits intoNVIDIA-NeMo:mainfrom
Closed
Conversation
Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>
Contributor
Author
|
/ok to test d8ded7c |
Contributor
Author
|
/ok to test 71d4668 |
Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>
Contributor
Author
|
/ok to test 34f6564 |
Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>
Signed-off-by: Marc Romeyn <marcromeyn@gmail.com>
Contributor
|
/ok to test 38d0ed2 |
Contributor
|
/ok to test ba5deb5 |
Contributor
|
This PR is stale because it has been open for 14 days with no activity. Remove stale label or comment or update or this will be closed in 7 days. |
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Offer API to merge base model weights with LoRA adapters given a path to a LoRA checkpoint generated from megatron bridge.
ConfigContainerin therun_config.yamlto read thepretrained_checkpointfield from theCheckpointConfig- this points to the path for the base model checkpoint directory.model_load_savefor initializing the base model from the serialized config and loading the base weights.run_config.yamland apply the transform.Parity with https://github.com/NVIDIA/NeMo/blob/42bc4b20b170cb65ed15e4691f9e769ca2941865/nemo/collections/llm/peft/api.py#L76-L80