Why is the attention_mask added to the attn_weights instead of multiplying/masking?
https://github.com/huggingface/transformers/blob/8fae93ca1972c39d19c8cf3d3c6a3dd2530cc59a/src/transformers/models/bart/modeling_bart.py#L219-L227

As far as I understand, attention_mask is to prevent the model peek into the future or padded positions, shouldn't the weights in these positions be masked out? What does this addition do?
Hello, Maybe this comment can help you out https://github.com/huggingface/transformers/issues/1935#issuecomment-561305086!<|||||>@LysandreJik Oh, I got it now, thank you!