-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Add trainer.validate example for GPT #6794
Conversation
Signed-off-by: ericharper <[email protected]>
Signed-off-by: ericharper <[email protected]>
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 great but should probably be double checked by someone
trainer=trainer, | ||
override_config_path=pretrained_cfg, | ||
save_restore_connector=save_restore_connector, | ||
map_location=f'cuda:{trainer.local_rank}', # map_location is needed for converted models |
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 don't use this usually, is it needed ?
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.
only for converted checkpoints
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.
Right I do inference with converted checkpoint and had no issues. Oh well if it doesn't hurt then it's ok
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'll test this again to see if we do need it
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.
lets merge this in for current release and we can remove the map location if we don't need it later - doesn't hurt keeping it there for now
Signed-off-by: ericharper <[email protected]>
Does this script allow you to make the GPTModel score a dataset supplied via args? That would be very useful. |
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.
LGTM, thanks!
* add trainer.validate example Signed-off-by: ericharper <[email protected]> * clean up white space Signed-off-by: ericharper <[email protected]> * add mbs and gbs to the config Signed-off-by: ericharper <[email protected]> --------- Signed-off-by: ericharper <[email protected]>
* add trainer.validate example * clean up white space * add mbs and gbs to the config --------- Signed-off-by: ericharper <[email protected]> Co-authored-by: Eric Harper <[email protected]>
What does this PR do ?
Enables an example of calling trainer.validate with GPT.
Collection: NLP
Changelog
Usage
# Add a code snippet demonstrating how to use this
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