Learn Before
Formula

Formula for Multiplicative Positional Embeddings

In Rotary Positional Embeddings, positional context is incorporated by treating embeddings as multiplicative transformations rather than additive ones. The final positional embedding for a token at position ii, denoted as ei\mathbf{e}_i, is calculated by multiplying its original token embedding vector xi\mathbf{x}_i by a position-specific rotation matrix R(i)R(i). This gives the formula: ei=xiR(i)\mathbf{e}_i = \mathbf{x}_i R(i), where xiRd\mathbf{x}_i \in \mathbb{R}^{d} is the token embedding and R(i)Rd×dR(i) \in \mathbb{R}^{d \times d} is the rotation matrix for position ii.

0

1

Updated 2026-04-29

Contributors are:

Who are from:

Tags

Foundations of Large Language Models

Ch.2 Generative Models - Foundations of Large Language Models

Foundations of Large Language Models Course

Computing Sciences

Related