Formula

Application of RoPE Rotation to a 2D Vector

The Rotary Positional Embedding (RoPE) rotation is applied to a two-dimensional vector x=[x1x2]x = \begin{bmatrix} x_1 & x_2 \end{bmatrix} by post-multiplying the vector by the corresponding 2D rotation matrix, RθR_\theta. The resulting rotated vector's components are calculated as follows: Ro(x,θ)=xRθ=[cosθx1sinθx2sinθx1+cosθx2]Ro(x, \theta) = xR_\theta = \begin{bmatrix} \cos \theta \cdot x_1 - \sin \theta \cdot x_2 & \sin \theta \cdot x_1 + \cos \theta \cdot x_2 \end{bmatrix}

0

1

Updated 2026-05-02

Contributors are:

Who are from:

Tags

Ch.2 Generative Models - Foundations of Large Language Models

Foundations of Large Language Models

Foundations of Large Language Models Course

Computing Sciences

Related