GPT2Attention()
class with _attn()
method when add_cross_attention=True
and therefore is_cross_attention=True
.
#35430
Labels
Feature request
Request for a new feature
Feature request
Model description
It seems like
GPT2Attention()
class allows_attn()
method withcausal_mask
only whenis_cross_attention=False
, but not whenis_cross_attention=True
.It would be more productive if
GPT2Attention()
supports_attn()
method withcausal_mask
even withis_cross_attention=True
.Motivation
When developing
EncoderDecoderModel
where the encoder isViTModel
and the decoder isGPT2Model
, the currentGPT2Model
class does not supportcausal_mask
ifadd_cross_attention=True
and thereforeis_cross_attention=True
.Your contribution
No contribution.
The text was updated successfully, but these errors were encountered: