-
Notifications
You must be signed in to change notification settings - Fork 12
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
Allow PaddingFree to work with DataCollatorForCompletionOnlyLM #78
Merged
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
Signed-off-by: Yu Chin Fabian Lim <[email protected]>
fabianlim
force-pushed
the
non-pretok-pf
branch
from
August 30, 2024 02:28
efa046d
to
5fe8dfd
Compare
Signed-off-by: 1000850000 user <[email protected]>
achew010
force-pushed
the
non-pretok-pf
branch
from
August 30, 2024 08:33
0dc0562
to
5b02774
Compare
fabianlim
commented
Aug 30, 2024
fabianlim
commented
Aug 30, 2024
@achew010 can you do a sanity check and open the |
Signed-off-by: 1000850000 user <[email protected]>
Signed-off-by: 1000850000 user <[email protected]>
achew010
force-pushed
the
non-pretok-pf
branch
from
September 3, 2024 03:55
7262036
to
4831b35
Compare
fabianlim
commented
Sep 4, 2024
achew010
force-pushed
the
non-pretok-pf
branch
from
September 4, 2024 06:26
35ccae4
to
afa1390
Compare
Signed-off-by: 1000850000 user <[email protected]>
achew010
force-pushed
the
non-pretok-pf
branch
3 times, most recently
from
September 5, 2024 04:33
f54550d
to
895900b
Compare
Signed-off-by: 1000850000 user <[email protected]>
achew010
force-pushed
the
non-pretok-pf
branch
from
September 5, 2024 04:37
895900b
to
c82945d
Compare
achew010
added a commit
that referenced
this pull request
Sep 6, 2024
* allow for padding_free logic in LM data collator Signed-off-by: Yu Chin Fabian Lim <[email protected]> * minor fixes to support non-pretok benchmarks Signed-off-by: 1000850000 user <[email protected]> * addressed code review Signed-off-by: 1000850000 user <[email protected]> * added trl dependency Signed-off-by: 1000850000 user <[email protected]> * fixes to installation of aadp Signed-off-by: 1000850000 user <[email protected]> * updated orca pf benchmarks Signed-off-by: 1000850000 user <[email protected]> --------- Signed-off-by: Yu Chin Fabian Lim <[email protected]> Signed-off-by: 1000850000 user <[email protected]> Co-authored-by: 1000850000 user <[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.
Description
Currently padding free plugin only works with
DataCollatorWithFlattening
. This PR makes it also work withDataCollatorForCompletionOnlyLM
that is used for the non-pretokenized use casescenarios.yaml
, we should be above to use thechat_templates
, but settokenize=False
and remove thenull
settings on the required fields for tokenization.Note:
Tests on Flan Subset (6000 samples)
Verified that dataset
data_cache.json
is only formatted and untokenized. To ensure that the loss is masked, added a keyword 'RESPONSE:
' in the chat template and as the response template thatDataCollatorForCompletionOnlyLM
will use to mask the loss.Example extracted from
dataset['train']['output'][0]
Verified that using an untokenized dataset to SFTTrainer matches previous padding-free performance with a pretokenized dataset.
Untokenized FLAN Dataset
Tokenized FLAN Dataset