cosFormer icon indicating copy to clipboard operation
cosFormer copied to clipboard

Why the attn mask is not used in forward function?

Open HanielF opened this issue 2 years ago • 1 comments

Compared with left_product function, attention mask is not used in forward() function. How to use the attention mask in the forward method?

HanielF avatar Mar 25 '22 12:03 HanielF

When use forward() function, there is no direct way to use attention mask since we haven't compute attention matrix. If you need use attention mask, we suggest you use left_product, however, this will get loss in efficiency.

Doraemonzzz avatar Mar 28 '22 09:03 Doraemonzzz