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

About CA #9

Open
mawei-north opened this issue Aug 30, 2024 · 3 comments
Open

About CA #9

mawei-north opened this issue Aug 30, 2024 · 3 comments

Comments

@mawei-north
Copy link

Hello, I would like to ask you what kind of shapes are text_features, and what kind of scale transformations did you use to generate the K,V.

@zhengchen1999
Copy link
Owner

text_feature: [batch, 77, 768]
In cross-attention, we scale the text_feature to the same channel size of the image feature.

@mawei-north
Copy link
Author

text_feature: [batch, 77, 768] In cross-attention, we scale the text_feature to the same channel size of the image feature.

But do you have the same matrix shape for k, v generated by text features and q, generated by image features in this way? Can you do matrix multiplication?

@zhengchen1999
Copy link
Owner

The qkv matrices do not need to have the same shape; they only need to have the same channel dimension.
The k and v matrices have the same shape is ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants