-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Save Virtual Prompt Weights Only #4237
Conversation
Signed-off-by: Virginia Adams <vadams@nvidia.com>
Signed-off-by: Virginia Adams <vadams@nvidia.com>
And any modification of core needs two core devs to approve it. FYI @ericharper |
Signed-off-by: Virginia Adams <vadams@nvidia.com>
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.
@ericharper can you work with Virginia to properly use the base class methods. This currently basically just replaces save to with custom impl which will just drift apart more and more from the base implementation
Signed-off-by: Virginia Adams <vadams@nvidia.com>
Signed-off-by: Virginia Adams <vadams@nvidia.com>
Signed-off-by: Virginia Adams <vadams@nvidia.com>
This pull request introduces 3 alerts when merging 89e374d into ff9bc79 - view on LGTM.com new alerts:
|
Signed-off-by: Virginia Adams <vadams@nvidia.com>
Signed-off-by: Virginia Adams <vadams@nvidia.com>
This pull request introduces 3 alerts when merging 9b3401d into ff9bc79 - view on LGTM.com new alerts:
|
Signed-off-by: Virginia Adams <vadams@nvidia.com>
Signed-off-by: Virginia Adams <vadams@nvidia.com>
Signed-off-by: Virginia Adams <vadams@nvidia.com>
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.
Overall looks fine, I'm just worried about the double extraction cost. At least it deleted the intermediate file so storage cost should be manageable.
Signed-off-by: Virginia Adams <vadams@nvidia.com>
…ub.com/NVIDIA/NeMo into prompt_learning_preserve_gpt_artifacts
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.
Looks good. @MaximumEntropy for final review before merge.
* Added gpt artifact preservation method Signed-off-by: Virginia Adams <vadams@nvidia.com> * Removed redundent line of code Signed-off-by: Virginia Adams <vadams@nvidia.com> * Moved preserve artifact method to NLPSaveStoreConnector Signed-off-by: Virginia Adams <vadams@nvidia.com> * Saving only prompt table weights in final nemo file Signed-off-by: Virginia Adams <vadams@nvidia.com> * Put NLP overrides back the way it was Signed-off-by: Virginia Adams <vadams@nvidia.com> * Put NLP overrides back the way it was Signed-off-by: Virginia Adams <vadams@nvidia.com> * Added doc strings for new methods Signed-off-by: Virginia Adams <vadams@nvidia.com> * Python style fix Signed-off-by: Virginia Adams <vadams@nvidia.com> * Added loading state dict backward compatibility Signed-off-by: Virginia Adams <vadams@nvidia.com> * Upddated prompt learning inference to reset frozen model path Signed-off-by: Virginia Adams <vadams@nvidia.com> * Python formatting fix Signed-off-by: Virginia Adams <vadams@nvidia.com> * Update prompt_learning.rst * Update prompt_learning.rst * Update prompt_learning.rst * changed model_file to gpt_model_file, updated CI tests Signed-off-by: Virginia Adams <vadams@nvidia.com> Signed-off-by: Yu Yao <yuya@nvidia.com>
Removes all GPT/Frozen model configs and weights from Prompt Learning Model's .nemo file. After training has ended, the prompt learning model now only saves prompt table parameters. During training, intermediate checkpoint files may also have prompt encoder parameters.
Collection: BigNLP
Usage
The final .nemo checkpoint file contains
where model_weights.ckpt only has prompt table params
Before your PR is "Ready for review"
Pre checks:
PR Type:
If you haven't finished some of the above items you can still open "Draft" PR.
Who can review?
Anyone in the community is free to review the PR once the checks have passed.
Contributor guidelines contains specific people who can review PRs to various areas.
Additional Information