Skip to content

feat: add a desc. for RoPE - #12

Open
mehrdad3301 wants to merge 3 commits into
jmaczan:mainfrom
mehrdad3301:rope
Open

mehrdad3301 wants to merge 3 commits into
jmaczan:mainfrom
mehrdad3301:rope

Conversation

@mehrdad3301

Copy link
Copy Markdown
Contributor

I added a short desc for RoPE

  • explains the K, Q projections after RMSNorm and before RoPE
  • explains the mathematical formula in detail
  • provides some intuition into how RoPE effects attention

Let me know what you think !

I wanted to add an incremental description for the implementation, much like RMSNorm, but skipped as it is straight forward I guess if you strictly follow the formulas. I was also thinking of reusing the same kernel for RoPE prefill in decode, since it has cos/sin tables precomputed. The description can also be incremental. First the implementation without the precomputed values, and then the precomputation and full implementation. Let me know what you think !

Thanks !

@mehrdad3301 mehrdad3301 changed the title feat: add a short desc. for rope feat: add a desc. for RoPE Sep 20, 2026
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

Successfully merging this pull request may close these issues.

1 participant