← Back to article

Equation 4 · How Llama's Architecture Actually Works, Generation by Generation

What does this equation mean?

θi=base−2(i−1)/d,i=1,…,d/2,\theta_i = \text{base}^{-2(i-1)/d}, \qquad i = 1, \dots, d/2,

Read the formula alongside the article passage below. Each part has a deeper page with its role in the equation, the supporting passage and nearby citations.

Inputs and operationsbase^-2(i-1)/d, qquad i = 1, dots, d/2
Result or conditiontheta_i
How to read the two sides of this formula. Follow the article passage for the meaning of each quantity.

This equation states an equality: the expressions on both sides have the same value under the article’s assumptions. Read the equation part by part below; each part has a contextual explanation and a link to its mathematical background.

Read it piece by piece

θi\theta_i

Symbol theta_i

thetaia_i is part of the quantity the equation computes from the expression on the right.

Understand this part →

ii

Symbol i

i is part of the quantity the equation computes from the expression on the right.

Understand this part →

dd

Symbol d

d is one of the signed contributions combined to compute the quantity on the left.

Understand this part →

=

=

The expressions on both sides represent the same quantity under the stated assumptions.

Understand this part →

See an illustrated explanation →
subtraction

subtraction

Subtract the following term or group from the preceding one. A leading minus marks a negative quantity.

Understand this part →

subscript

subscript

The lower label selects a particular version, component, or indexed member of the quantity. For example, x₀ and xₜ can be values at different positions.

Understand this part →

superscript

superscript

A raised number can be a power. When it is a label or bound, it selects a case or the upper limit of a sum; the formula’s structure distinguishes these uses.

Understand this part →

See an illustrated explanation →

How to interpret it

Read it with the definitions, units, and assumptions supplied by the article.

What the article says around this equation

Split each query or key vector of dimension d into d/2 two-dimensional pairs. Pair i is assigned a fixed rotation frequency θi=base−2(i−1)/d,i=1,…,d/2\theta_i = \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 :

Read the equation in its article →

Sources cited in the article section

These citations give research context. Read each source to check which claims it supports.

Return to How Llama's Architecture Actually Works, Generation by Generation

See this formula across 1 published context →

Browse the mathematical compendium →