rope_mrope_interleaved

Function rope_mrope_interleaved 

Source
pub fn rope_mrope_interleaved(
    gpu: &dyn GpuBackend,
    kernel: KernelHandle,
    q: DevicePtr,
    k: DevicePtr,
    pos_t: DevicePtr,
    pos_h: DevicePtr,
    pos_w: DevicePtr,
    seq_len: u32,
    num_q_heads: u32,
    num_kv_heads: u32,
    head_dim: u32,
    rotary_dim: u32,
    theta: f32,
    stream: u64,
) -> Result<()>
Expand description

2026-09-25: Interleaved multimodal RoPE (MRoPE) with three position streams (pos_t, pos_h, pos_w); rotary pair i takes its position from stream i % 3. With the same pointer for all three, the math is that of rope.