-
Notifications
You must be signed in to change notification settings - Fork 148
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
[transformers] Prompt masking #2192
base: main
Are you sure you want to change the base?
Conversation
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.
Calculation of the mask looks good but pretty sure its being applied backwards. Lets add a test case to test the whole pipeline so we catch this error(ie text -> tokenization -> text and confirm the labels are masked out only on the prompts.
Also, can you update the internal_docs repo with instructions on how to use this new feature on a custom dataset: https://github.com/neuralmagic/internal-docs/blob/main/teams/ml-engineering/sparseml/text_generation/custom_datasets.md
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 LGTM, just want to see a few more test cases (see comments)
Applying character masks to a prompts in the format
[foo]some text here\n[bar]response here
, to mask characters owned by[bar]