Replying to @Ji_Ha_KimAn additional note: complex numbers can be used to represent rotations very simply. Intuitively, RoPE is coupling every 2 consecutive dimensions of the embedding space. Let q = [x1,y1,x2,y2,…] then we update with e^ik(x+iy)=(x cos k - y sin k) + i(x sin k + y cos k), k=ptheta