Skip to content
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

Added max sample length filter to unlearning and retaining datasets #156

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

TheRootOf3
Copy link
Collaborator

Added a way to set the maximum sample length (in tokens) for both the unlearning and retaining datasets. This was implemented to limit the GPU memory usage on longer samples.

This change introduces another argument to the unlearn_harm.py script: max_sample_length, which represents the maximum number of tokens (after adding the prompt) of a sample. Essentially, this will be the maximum dimension of a tensor that goes through the model.

TheRootOf3 and others added 3 commits September 23, 2024 17:30
Signed-off-by: TheRootOf3 <aceszablewski@gmail.com>
Signed-off-by: Szymon Duchniewicz <szymon.duchniewicz.20@ucl.ac.uk>
…tructor.

Signed-off-by: Szymon Duchniewicz <szymon.duchniewicz.20@ucl.ac.uk>
@TheRootOf3 TheRootOf3 requested a review from Willmish September 23, 2024 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants