Skip to main content

chunk_cos_sin

Function chunk_cos_sin 

Source
fn chunk_cos_sin<B: Backend>(
    cum_bsha: &F<B, 4>,
    start: usize,
    len: usize,
    per_head_dim: usize,
    transpose: bool,
) -> (F<B, 5>, F<B, 5>)
Expand description

The rotation’s per-pair cos/sin for one chunk, expanded over per_head_dim: [b, h, l, p, a] each. transpose negates the angle — false applies the de-rotation R(−θ) (cache → physical), true its transpose R(+θ) (used on cotangents).