Skip to main content

rope_half

Function rope_half 

Source
pub fn rope_half(
    x: &mut [f32],
    head_dim: usize,
    pos: usize,
    theta: f32,
) -> Result<(), EngineError>
Expand description

HF Llama/Qwen/Gemma RoPE: rotate half of the head dims as a contiguous block.