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

Exception: The provided qkv memory layout is not supported! when using RoPE #455

Closed
halilakin opened this issue Oct 3, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@halilakin
Copy link

halilakin commented Oct 3, 2023

Both MultiheadAttention and TransformerLayer work fine without the rotary_pos_emb in the forward pass. However, when passing rotary_pos_emb, I get the error above.

It seems using RoPE (i.e., passing rotary embeddings in the forward of MHA) is causing query_layer and key_layer's memory layouts to change. Is this expected and is there a workaround?

@ptrendx
Copy link
Member

ptrendx commented Oct 3, 2023

@cyanguwa Could you investigate this? It sounds like a bug.

@ptrendx ptrendx added the bug Something isn't working label Oct 3, 2023
@yongyanrao
Copy link

Noticed the same issue. It seems due to rotary is not an inplace operation.

@cyanguwa
Copy link
Collaborator

@halilakin @yongyanrao , please give PR 453 a try and let me know if there's still a problem. Thanks!

@yongyanrao
Copy link

yongyanrao commented Oct 10, 2023

@cyanguwa Thank you for the quick response. We tested the changes, along with the newly implemented RotaryPositionEmbedding. They worked perfectly from our side so far. Also doing some further tests, will keep you posted on the result. Thanks again.

@ptrendx
Copy link
Member

ptrendx commented Oct 17, 2023

Seems that the issue has been resolved - closing. Please reopen if your tests show that there are still some problems here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants