conformer icon indicating copy to clipboard operation
conformer copied to clipboard

'context' in Attention Module

Open JaesungHuh opened this issue 4 years ago • 1 comments

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.

JaesungHuh avatar Aug 12 '21 21:08 JaesungHuh

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

robflynnyh avatar Aug 02 '22 18:08 robflynnyh