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

The code of the alignment bias is not consistent with Equation 9. #86

Open
FacePoluke opened this issue May 15, 2023 · 1 comment
Open

Comments

@FacePoluke
Copy link

image
The values outside of the diagonal are 1, not -inf.

@ChengyuanYan
Copy link

the function returns a boolean mask so the placeholder value doesn't really matter. When the transformer computes attention, places that have non-zero value (i.e. True in the returned matrix) will be masked out, which is somewhat equivalent to adding -inf to the attention value

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

2 participants