Categories: AI/ML Research

Rotary Position Embeddings for Long Context Length

This article is divided into two parts; they are: • Simple RoPE • RoPE for Long Context Length Compared to the sinusoidal position embeddings in the original Transformer paper, RoPE mutates the input tensor using a rotation matrix: $$ begin{aligned} X_{n,i} &= X_{n,i} cos(ntheta_i) – X_{n,frac{d}{2}+i} sin(ntheta_i) \ X_{n,frac{d}{2}+i} &= X_{n,i} sin(ntheta_i) + X_{n,frac{d}{2}+i} cos(ntheta_i) end{aligned} $$ where $X_{n,i}$ is the $i$-th element of the vector at the $n$-th position of the sequence of tensor $X$.
AI Generated Robotic Content

Recent Posts

Never forget…

submitted by /u/ShadowBoxingBabies [link] [comments]

14 hours ago

A Reinforcement Learning Based Universal Sequence Design for Polar Codes

To advance Polar code design for 6G applications, we develop a reinforcement learning-based universal sequence…

14 hours ago

Democratizing business intelligence: BGL’s journey with Claude Agent SDK and Amazon Bedrock AgentCore

This post is cowritten with James Luo from BGL. Data analysis is emerging as a…

14 hours ago

An ‘Intimacy Crisis’ Is Driving the Dating Divide

In his book The Intimate Animal, sex and relationships researcher Justin Garcia says people have…

15 hours ago

New fire just dropped: ComfyUI-CacheDiT ⚡

ComfyUI-CacheDiT brings 1.4-1.6x speedup to DiT (Diffusion Transformer) models through intelligent residual caching, with zero…

2 days ago