pub fn rope_half( x: &mut [f32], head_dim: usize, pos: usize, theta: f32, ) -> Result<(), EngineError>
HF Llama/Qwen/Gemma RoPE: rotate half of the head dims as a contiguous block.