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

Is the causal attention really works here? #16

Open
charlesxu90 opened this issue Jun 15, 2022 · 2 comments
Open

Is the causal attention really works here? #16

charlesxu90 opened this issue Jun 15, 2022 · 2 comments

Comments

@charlesxu90
Copy link

Found out that Efficient attention doesn't work on Causal attention scenario as mentioned here.
cmsflash/efficient-attention#4

So I doubt if the causal in this code really works?

@lucidrains
Copy link
Owner

@charlesxu90 yea it works

@charlesxu90
Copy link
Author

@lucidrains Thanks for answering me. Really appreciated!

Causal self-attention requires a triangle-like attention mask to mask out future tokens. In this code, I did find the interface you left for input_mask.

However, I didn't find the spot you initiate the attention mask. That's something confused me.

Thanks.

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