← All parts of this equation

Equation 6 · Part 1 · How Llama's Architecture Actually Works, Generation by Generation

Symbol i

ii
ii

What this part means

the pair.

Its job in the formula

i is a part of this expression. Its role is fixed by the surrounding article and by the operations shown in the formula.

Where the article explains it

Pair i is assigned a fixed rotation frequency θi\theta_i = base−2(i−1)/d\text{base}^{-2(i-1)/d}, \qquad i = 1, …\dots, d/2, and a vector at sequence position m has its i -th pair rotated by angle mθi\theta_i : x2i−1′=x2i−1cos⁡(mθi)−x2isin⁡(mθi)x2i′=x2i−1sin⁡(mθi)+x2icos⁡(mθi)\begin{aligned} x'_{2i-1} &= x_{2i-1}\cos(m\theta_i) - x_{2i}\sin(m\theta_i) \\ x'_{2i} &= x_{2i-1}\sin(m\theta_i) + x_{2i}\cos(m\theta_i) \end{aligned} The property that makes this useful rather than merely elegant is that rotating a query at position m and a key at position n by these matrices before taking their dot product leaves a result that depends only on the distance between them: ⟨\langle RΘ,mR_{\Theta,m}\,q,\; RΘ,nR_{\Theta,n}\,k⟩\rangle \;=\; ⟨\langle RΘ, m−nR_{\Theta,\,m-n}\,q,\; k⟩\rangle.

The passage around this formula

and a vector at sequence position m has its i -th pair rotated by angle mθi\theta_i :

Read this part in the article →

Learn the underlying idea

A variable is a named place for a value. Its letter is a local label: x can mean position in one formula and a data point in another.

Open the illustrated variables: a letter stands for a value guide →

See this notation across published equations →

Sources cited in the article section

These citations provide research context; check each source for the exact claim it supports.