ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Solve for the rotary frequency index at a chosen rotation count

At index i, the unscaled angular frequency is base^(−2 i/dim). Over orig_max positions it completes orig_max*base^(−2 i/dim)/(2π) rotations. Setting that count equal to rot and solving logarithmically for i gives the displayed correction coordinate. The caller rounds…

Donor model implementationhistorical source recovered; expression not executed in this website audit
Learn with the Atlas

Learn to read this model

Start with the symbols, follow the operations, and check what the result means.

Open guided lesson
donor-eq-e465f70126f0c6source-code mathematical expression
return (dim * math.log(max_position_embeddings / (num_rotations * 2 * math.pi))) / (2 * math.log(base))

Read the equation

At index i, the unscaled angular frequency is base^(−2 i/dim). Over orig_max positions it completes orig_max*base^(−2 i/dim)/(2π) rotations. Setting that count equal to rot and solving logarithmically for i gives the displayed correction coordinate. The caller rounds and clamps coordinates to form a blending interval.

Terms & definitions

TermMeaning in this source
rot

Target number of rotations

dim

Rotary feature dimension

base

Positive frequency base different from1

orig_max

Original context length

How it works

Read the definition from its right-hand expression to the quantity on the left. Its surrounding source records the intended input, state, or parameter context. Where the source leaves an operation unspecified, this page preserves that gap.

Assumptions & limits

Source recovery establishes that the expression appears in this record. Its mathematical validity, implementation behavior, and interpretation must be assessed separately. See the linked source and research notes for the checks available for this version.

Original context

Read the surrounding source passage
dim,
                             base=10000,
                             max_position_embeddings=2048):
    return (dim * math.log(max_position_embeddings /
                           (num_rotations * 2 * math.pi))) / (2 *
                                                              math.log(base))


# Find dim range bounds based on rotations
Exact original notation
return (dim * math.log(max_position_embeddings /
                           (num_rotations * 2 * math.pi))) / (2 *
                                                              math.log(base))

Related builds

Sources & provenance

01
kimi source tree.txt
lines 2548–2550 · Aug 5, 2026
return (dim * math.log(max_position_embeddings / (num_rotations * 2 * math.pi))) / (2 * math.log(base))
02
DEEPSEEK_R1_COMPLETE.txt
lines 2339–2341 · Aug 5, 2026
return (dim * math.log(max_position_embeddings / (num_rotations * 2 * math.pi))) / ( 2 * math.log(base) )
03
kimi source tree.txt
lines 2548–2550 · Aug 5, 2026
return (dim * math.log(max_position_embeddings / (num_rotations * 2 * math.pi))) / (2 * math.log(base))
04
DEEPSEEK_R1_COMPLETE.txt
lines 2339–2341 · Aug 5, 2026
return (dim * math.log(max_position_embeddings / (num_rotations * 2 * math.pi))) / ( 2 * math.log(base) )

Search equations, builds, manuscript text, and recovered sources.