{"id":18561366,"url":"https://github.com/vachanvy/rotary-embeddings","last_synced_at":"2025-11-01T12:30:36.827Z","repository":{"id":221110493,"uuid":"752622246","full_name":"VachanVY/Rotary-Embeddings","owner":"VachanVY","description":"Simple Implementation of Rotary Positional Embeddings (RoPE) and Sinusoidal Positional Embeddings in JAX","archived":false,"fork":false,"pushed_at":"2025-01-28T12:43:09.000Z","size":267,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-28T13:27:23.793Z","etag":null,"topics":["embeddings","jax","paper-implementations","positional-embedding","rotary-embeddings"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VachanVY.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-04T11:47:10.000Z","updated_at":"2025-01-28T12:43:13.000Z","dependencies_parsed_at":"2024-02-06T08:44:55.976Z","dependency_job_id":null,"html_url":"https://github.com/VachanVY/Rotary-Embeddings","commit_stats":null,"previous_names":["vachanvy/rotary-embeddings"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VachanVY%2FRotary-Embeddings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VachanVY%2FRotary-Embeddings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VachanVY%2FRotary-Embeddings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VachanVY%2FRotary-Embeddings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VachanVY","download_url":"https://codeload.github.com/VachanVY/Rotary-Embeddings/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239288075,"owners_count":19614048,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["embeddings","jax","paper-implementations","positional-embedding","rotary-embeddings"],"created_at":"2024-11-06T22:06:39.125Z","updated_at":"2025-11-01T12:30:36.776Z","avatar_url":"https://github.com/VachanVY.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rotary Positional Embedding: [[paper]](https://arxiv.org/pdf/2104.09864v5.pdf)\n* Let\n  ![image](https://github.com/user-attachments/assets/e10b2a9d-37d6-467d-b728-7d8f5906a13f)\n* We need the transformation functions above ($f_q$ and $f_k$), such that they satisfy the below equation, the resultant function should encode **relative** position information\n  ![image](https://github.com/user-attachments/assets/5d9538aa-d3bf-4c25-b2b8-3d1cd78ceb5f)\n  ![1.png](rope3.png)\n  ![image](https://github.com/user-attachments/assets/8e679770-6483-4cba-b530-36fa5cc90ddc)\n\n* ![2.png](rope2.png)\n  ![3.png](rope1.png)\n\n\n## Also See\n* [Reference-1](https://github.com/ZhuiyiTechnology/roformer/tree/main?tab=readme-ov-file#implementation)\n* [Reference-2](https://github.com/facebookresearch/llama/blob/ef351e9cd9496c579bf9f2bb036ef11bdc5ca3d2/llama/model.py#L80C1-L161C50)\n\n* ![image](https://github.com/user-attachments/assets/1aca7332-12f1-4155-8183-37b2168d6b51)\n* ![image](https://github.com/user-attachments/assets/d260e4e8-02c7-40d8-b863-c915963c7e12)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvachanvy%2Frotary-embeddings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvachanvy%2Frotary-embeddings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvachanvy%2Frotary-embeddings/lists"}