Definition of the 2x2 RoPE Rotation Matrix Block
The 2x2 rotation matrix is the fundamental building block of the larger block-diagonal matrix used in Rotary Positional Embeddings (RoPE). It rotates a pair of dimensions by an angle , where represents the position and is a specific frequency parameter. The matrix is defined as:

0
1
Tags
Ch.2 Generative Models - Foundations of Large Language Models
Foundations of Large Language Models
Foundations of Large Language Models Course
Computing Sciences
Ch.3 Prompting - Foundations of Large Language Models
Related
Definition of the 2x2 RoPE Rotation Matrix Block
Calculation of RoPE Frequency Parameters
Exponential Form of RoPE Frequency Parameters
In a transformer model using Rotary Positional Embeddings, the transformation for each token depends on its position and a vector of frequency parameters,
θ = [θ₁, ..., θ_{d/2}], where each componentθ_kcorresponds to a different 2-dimensional rotation. A researcher proposes a modification where all components of this vector are set to the same value (i.e.,θ₁ = θ₂ = ... = θ_{d/2}). What is the most likely consequence of this change on the model's ability to represent positional information?Effect of Modifying RoPE Frequency Parameters
In the implementation of Rotary Positional Embeddings (RoPE), the vector of frequency parameters,
θ = [θ₁, ..., θ_{d/2}], ensures that for any given token position, all pairs of dimensions within its embedding are rotated by the same amount.Application of RoPE Rotation to a 2D Vector
RoPE Frequency Parameters
Definition of the 2x2 RoPE Rotation Matrix Block
RoPE Parameter Vector Definition
Definition of RoPE Parameter Vector (θ)
A language model encodes token positions by applying a unique, position-dependent rotational transformation to each token's initial embedding. The final, position-aware embedding for a token is the result of this transformation. If the exact same token (e.g., 'model') appears at position 4 and later at position 12 in a sequence, which statement best describes the relationship between their final embeddings, and ?
RoPE 2D Vector Rotation Formula
Formula for RoPE-Encoded Token Embedding
Uniqueness of RoPE-based Embeddings
Debugging a RoPE Implementation
Application of RoPE Rotation to a 2D Vector
Definition of the 2x2 RoPE Rotation Matrix Block
A developer is implementing a function to rotate a 2D row vector
vcounter-clockwise by an angleθ. The operation is performed by post-multiplying the vector by a 2x2 matrixR(i.e.,v_rotated = vR). Which of the following matrices correctly represents this transformation?Constructing a 90-Degree Rotation Matrix
Consider a transformation applied to a 2D row vector
vby post-multiplying it with a matrixR(i.e.,v_rotated = vR). The matrix correctly performs a counter-clockwise rotation of the vector by an angle θ.
Learn After
Euclidean Representation of RoPE Rotation
In a specific positional encoding method, pairs of embedding dimensions are rotated using a 2x2 matrix defined as: where
tis the token's position and\theta_kis a frequency. Given a token at positiont = 2and a frequency\theta_k = \pi/4, which matrix correctly represents the rotation?In a certain positional encoding method, the rotation of a pair of dimensions is achieved using the matrix , where
tis the position and\thetais a frequency parameter.Applying a Rotational Transformation Matrix