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

'context' in Attention Module #9

Open
JaesungHuh opened this issue Aug 12, 2021 · 1 comment
Open

'context' in Attention Module #9

JaesungHuh opened this issue Aug 12, 2021 · 1 comment

Comments

@JaesungHuh
Copy link

Hi, thanks for releasing this code. I'm enjoying playing with this.

Could you please explain what is 'context' in your Attention module, if possible? link.

I guess it has a similar role to the previous hidden state for reuse in Transformer-XL paper link (which is explained in Section 3.2), but the way you implemented is little different.

@robflynnyh
Copy link

This is for cross-attention, i.e it's used to form keys and values, if it's not provided then x is used to form both and it defaults to self-attention

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