RoPE Playground — Argand rotation + relative-position score
Toy 2D planes, but with an option to sum multiple frequencies (closer to real RoPE’s “many 2D pairs”).
Token sequence (space-separated)
BOS the blue dwarfs dance tonight . EOS
We assign each token a fixed “content” vector (deterministic hash → angle + magnitude), then apply RoPE rotation by position.
Query token index m (0-based)
Position start
0,1,2,...
1,2,3,...
p = index + start
RoPE mode
Single θ (one 2D plane)
Multi-frequency (sum of planes)
θ (single) / θ scale (multi)
Multi-frequency count (K planes)
Each plane uses θᵢ = base · 1/10000^(2i/K) (sinusoid-style spacing).
Animation
▶ Play
Reset
Speed
base content vectors
RoPE-rotated vectors (for current θ)
query token m
Score vs relative offset Δ = n − m