ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Rotate paired key coordinates using a position-dependent angle

rotate_half maps a pair of coordinate blocks(x 1,x 2) to(−x 2,x 1). Multiplication by cosine and addition of the sine-weighted rotated vector implements a two-dimensional rotation for each coordinate pair. The surrounding interleave-to-block reshape determines which…

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-d70470ce26f811source-code mathematical expression
kembed=(k∗cos)+(rotatehalf(k)∗sin)k_embed = (k * cos) + (rotate_half(k) * sin)

Read the equation

rotate_half maps a pair of coordinate blocks(x 1,x 2) to(−x 2,x 1). Multiplication by cosine and addition of the sine-weighted rotated vector implements a two-dimensional rotation for each coordinate pair. The surrounding interleave-to-block reshape determines which coordinates are paired. Norm is preserved when the paired sine/cosine coefficients have unit squared sum.

Terms & definitions

TermMeaning in this source
k

Key vector after source-prescribed pairing

cos

Cosines for the token position

sin

Sines for the token position

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
k = k.view(b, h, s, d // 2, 2).transpose(4, 3).reshape(b, h, s, d)

    q_embed = (q * cos) + (rotate_half(q) * sin)
    k_embed = (k * cos) + (rotate_half(k) * sin)
    return q_embed, k_embed
Exact original notation
k_embed = (k * cos) + (rotate_half(k) * sin)

Related builds

Sources & provenance

01
kimi source tree.txt
lines 2681–2681 · Aug 5, 2026
k_embed = (k * cos) + (rotate_half(k) * sin)
02
DEEPSEEK_R1_COMPLETE.txt
lines 2480–2480 · Aug 5, 2026
k_embed = (k * cos) + (rotate_half(k) * sin)
03
kimi source tree.txt
lines 2681–2681 · Aug 5, 2026
k_embed = (k * cos) + (rotate_half(k) * sin)
04
DEEPSEEK_R1_COMPLETE.txt
lines 2480–2480 · Aug 5, 2026
k_embed = (k * cos) + (rotate_half(k) * sin)

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