Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

[transformers] Prompt masking #2192

Closed
wants to merge 13 commits into from
Closed

[transformers] Prompt masking #2192

wants to merge 13 commits into from

Conversation

horheynm
Copy link
Contributor

@horheynm horheynm commented Mar 20, 2024

Applying character masks to a prompts in the format [foo]some text here\n[bar]response here, to mask characters owned by[bar]

bfineran
bfineran previously approved these changes Mar 20, 2024
Copy link

@Satrat Satrat left a 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

Copy link

@Satrat Satrat left a 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)

Satrat
Satrat previously approved these changes Apr 5, 2024
bfineran
bfineran previously approved these changes Apr 8, 2024
@bfineran bfineran dismissed stale reviews from Satrat and themself via 4b0ad66 April 15, 2024 15:11
@bfineran bfineran changed the title Prompt mask [transformers] Prompt masking Apr 15, 2024
@jeanniefinks
Copy link
Member

Per the main README announcement, SparseML is being deprecated by June 2, 2025. Closing the PR as work has been suspended; thank you for the inputs and support!

@jeanniefinks jeanniefinks deleted the prompt-mask branch June 2, 2025 19:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants