Medium

Implement RoPE applied to a [batch, heads, seq, head_dim] tensor

Transformer Architecture Internals · Problem 4 of 7

Chapter 01Transformer Architecture Internals

Implement RoPE applied to a [batch, heads, seq, head_dim] tensor

MediumProblem 4 / 7

Implement RoPE applied to a [batch, heads, seq, head_dim] tensor.

Implement the function/class skeleton in the editor. Any correct approach is accepted.

Hints