Formula

Relative Position Offset Calculation

The relative position offset between a query at index ii and a key at index jj is calculated as the simple difference of their indices. This value, often denoted as d(i,j)d(i, j), quantifies the distance and direction between two tokens in a sequence and is computed using the formula: d(i,j)=iāˆ’jd(i, j) = i - j

0

1

Updated 2026-04-23

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