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

Tiny bug with padding #3

Open
kkteru opened this issue Apr 3, 2022 · 0 comments
Open

Tiny bug with padding #3

kkteru opened this issue Apr 3, 2022 · 0 comments

Comments

@kkteru
Copy link

kkteru commented Apr 3, 2022

Hey @wzhouad,

This is probably a harmless bug in the current code base but just wanted to point this out FYI.

The padding token is hard-coded to 0 in this line. However, for many models padding token id is non-zero (for roberta based models it's 1 and 0 actually corresponds to BOS token). As long as one sends the right attention mask (as you do), this should be harmless. Otherwise, this is a silent bug that might go unnoticed.

Cheers,
Komal

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

No branches or pull requests

1 participant