Frequency and rotation lab

For a 64-dimensional vector, choose pair k and see how its frequency controls sinusoidal position codes and RoPE rotation.

Position and frequency

Waves across token positions

Blue: sine; orange: cosine. Vertical markers show positions m and m+Δ. Increase k to lower the frequency and lengthen the period.

For fixed 2D vectors q=k=[1,0], rotating them at m and m+Δ gives dot product cos(ωΔ). Shift both positions by 7: the dot product remains the same.