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

Rotary Position Embedding #81

Open
ahmdtaha opened this issue Jan 5, 2022 · 0 comments
Open

Rotary Position Embedding #81

ahmdtaha opened this issue Jan 5, 2022 · 0 comments

Comments

@ahmdtaha
Copy link

ahmdtaha commented Jan 5, 2022

Hi Phillip,

I have a question about your rotary position implementation. I will use the notation and equation numbers from [1].
This line is the realization of Eq. 34 in [1]. If I am correct, why you add a fixed positional embedding to the query/key/value in this line?

Another way to put the same question, The position m in Eq. 13 appears inside the 2x2 rotation matrix only. So why add the position m encoding to the query/key/value?

BTW, thanks for all your open-source code, great job!

[1] RoFormer: Enhanced Transformer with Rotary Position Embedding

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

1 participant