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

fix mask bug in batch setting #2

Closed
wants to merge 1 commit into from
Closed

Conversation

tachim
Copy link

@tachim tachim commented Jan 2, 2022

The original implementation accidentally assumes batch size 1 here, and the mask's batch dimension (1) is automatically broadcast to the # of heads. If batch size is greater than 1, we have to handle that explicitly by copying it once for each head.

@lucidrains
Copy link
Owner

@tachim Hi Tudor! Thanks for catching this bug! I put in a quick fix here db6b82e

@lucidrains lucidrains closed this Jan 13, 2022
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