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

Don't left truncate stuff anymore #239

Merged
merged 1 commit into from
May 3, 2023
Merged

Don't left truncate stuff anymore #239

merged 1 commit into from
May 3, 2023

Conversation

norabelrose
Copy link
Member

Left truncation was a terrible idea, idk why I ever thought it made sense.

Some models, in particular unifiedqa-t5-11b, have unusually short context lengths so that a significant fraction (e.g. 20%) of prompts just get truncated from the left, potentially removing important info about the task. This seems to be leading to degraded performance.
image

This PR fixes the problem by simply skipping examples in extract_hiddens which exceed the max length indicated by the tokenizer.

@norabelrose norabelrose merged commit 8ba18c3 into main May 3, 2023
@norabelrose norabelrose deleted the no-truncation branch May 3, 2023 08:31
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.

None yet

2 participants