-
Notifications
You must be signed in to change notification settings - Fork 30.9k
Track the number of tokens seen to metrics #27274
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
Conversation
|
The documentation is not available anymore as the PR was closed or merged. |
|
@amyeroberts question: these failures are all because they cannot find the For instance, one of the failures in the examples script is from self = {'input_values': tensor([[-0.0177, -0.0188, -0.0202, ..., -0.0032, -0.0068, -0.0039],
[-0.0196, -0.0556, -0.0...-100, -100, -100, -100, -100, -100, -100, -100, -100,
-100, -100, -100, -100, -100, -100, -100, -100, -100]])} |
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.
Thanks for adding this!
Main comment is about whether this should be running by default
|
@muellerzr I think we don't have to worry about that if it's behind a flag in the training args. This way - if someone want to measure it then they have to make sure that |
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.
Thanks for adding and iterating!
Just some nits on the implementation
03f74e7 to
4c0366c
Compare
|
@amyeroberts failing tests seem to be unrelated |
4c0366c to
d01ba62
Compare
d01ba62 to
8481a8e
Compare
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.
Thanks!
Co-authored-by: amyeroberts <[email protected]>
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. |
* Add tokens seen * Address comments, add to TrainingArgs * Update log * Apply suggestions from code review Co-authored-by: amyeroberts <[email protected]> * Use self.args * Fix docstring Co-authored-by: amyeroberts <[email protected]> --------- Co-authored-by: amyeroberts <[email protected]>
What does this PR do?
This PR adds
num_tokens_seento theTrainerStateallowing users to know how many tokens were passed in an individual batch. Usesgatherto ensure that in DDP this can be known as well.Fixes #27027
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.
@pacman100 @amyeroberts