-
Notifications
You must be signed in to change notification settings - Fork 431
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
Fix bug with CoT early stopping and LLama2 tokenizer #2902
Merged
bmosaicml
merged 16 commits into
mosaicml:dev
from
bmosaicml:patch_cot_for_spiece_tokenizer
Jan 29, 2024
Merged
Fix bug with CoT early stopping and LLama2 tokenizer #2902
bmosaicml
merged 16 commits into
mosaicml:dev
from
bmosaicml:patch_cot_for_spiece_tokenizer
Jan 29, 2024
Conversation
This file contains 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
dakinggg
reviewed
Jan 24, 2024
dakinggg
reviewed
Jan 24, 2024
Can you please include some evidence this resolves the issue in the pr description? |
…/composer into patch_cot_for_spiece_tokenizer
dakinggg
reviewed
Jan 26, 2024
dakinggg
reviewed
Jan 26, 2024
dakinggg
reviewed
Jan 26, 2024
dakinggg
reviewed
Jan 26, 2024
dakinggg
reviewed
Jan 26, 2024
Co-authored-by: Daniel King <[email protected]>
dakinggg
approved these changes
Jan 27, 2024
…/composer into patch_cot_for_spiece_tokenizer
ShashankMosaicML
pushed a commit
to ShashankMosaicML/composer
that referenced
this pull request
Feb 3, 2024
* finish * finish * add fixture * add fixture * add fixture * Update tests/datasets/test_in_context_learning_datasets.py Co-authored-by: Daniel King <[email protected]> * fix * pyright * precommit --------- Co-authored-by: Daniel King <[email protected]>
ShashankMosaicML
pushed a commit
to ShashankMosaicML/composer
that referenced
this pull request
Feb 3, 2024
* finish * finish * add fixture * add fixture * add fixture * Update tests/datasets/test_in_context_learning_datasets.py Co-authored-by: Daniel King <[email protected]> * fix * pyright * precommit --------- Co-authored-by: Daniel King <[email protected]>
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.
What does this PR do?
LLaMa2 tokenizer didn't work with early stopping because it inserted some extra token (28971) before \n\n. This caused the stop sequence to appear longer than it really was, which resulted in the stopping criteria looking back too far into the input and causing generation to stop as soon as it begins. With the new implementation we remove any superfluous tokens in the stopping criteria (i.e. those tokens that add nothing to the decoded result) I also reduced the amount of extra lookback we do to make it so we don't ever look back farther than we should and stop as soon as generation begins.
Testing:
mpt-eval-NzfmSy
Results replicate LLama2 paper (14.6 for 7b)
What issue(s) does this change relate to?
Before submitting
pre-commit
on your change? (see thepre-commit
section of prerequisites)