Equation 12 · How Llama's Architecture Actually Works, Generation by Generation
What does this equation mean?
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.
This mathematical expression combines the displayed quantities; its precise role follows from the surrounding article text. 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
Symbol d
d is a part of this expression. Its role is fixed by the surrounding article and by the operations shown in the formula.
How to interpret it
Read this expression with the definitions, units, and assumptions supplied by the article.
What the article says around this equation
The one free parameter is base , the constant that sets how quickly the rotation angles grow across the d/2 frequency bands. A small base makes low-index pairs rotate almost a full turn per token, encoding fine-grained short-range position; a large base slows that rotation down, which is what lets high-index pairs still carry usable positional signal at sequence positions far beyond what the model saw in training. Llama 1 and Llama 2 shipped with the RoPE default of base = 10,000, matching the value in Su and colleagues’ original formulation. Llama 3 raised it to 500,000 specifically as part of extending context to 128,000 tokens [ 5 , 2 ] . Nothing about the rotation mechanism changed…
Read the full surrounding passage
The one free parameter is base , the constant that sets how quickly the rotation angles grow across the d/2 frequency bands. A small base makes low-index pairs rotate almost a full turn per token, encoding fine-grained short-range position; a large base slows that rotation down, which is what lets high-index pairs still carry usable positional signal at sequence positions far beyond what the model saw in training. Llama 1 and Llama 2 shipped with the RoPE default of base = 10,000, matching the value in Su and colleagues’ original formulation. Llama 3 raised it to 500,000 specifically as part of extending context to 128,000 tokens [ 5 , 2 ] . Nothing about the rotation mechanism changed between the two generations. One constant did, because that constant is precisely the dial that trades short-range precision for long-range reach.
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