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

GPT2Attention() class with _attn() method when add_cross_attention=True and therefore is_cross_attention=True. #35430

Open
CHLEE-Leo opened this issue Dec 27, 2024 · 0 comments
Labels
Feature request Request for a new feature

Comments

@CHLEE-Leo
Copy link

CHLEE-Leo commented Dec 27, 2024

Feature request

Model description

It seems like GPT2Attention() class allows_attn() method with causal_mask only when is_cross_attention=False, but not when is_cross_attention=True.

It would be more productive if GPT2Attention() supports _attn() method with causal_mask even with is_cross_attention=True.

Motivation

When developing EncoderDecoderModel where the encoder is ViTModel and the decoder isGPT2Model, the current GPT2Model class does not support causal_mask if add_cross_attention=True and therefore is_cross_attention=True.

Your contribution

No contribution.

@CHLEE-Leo CHLEE-Leo added the Feature request Request for a new feature label Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request Request for a new feature
Projects
None yet
Development

No branches or pull requests

1 participant