Skip to main content

split_heads

Function split_heads 

Source
pub fn split_heads(
    qkv: &[f32],
    t: usize,
    c: usize,
    h: usize,
) -> (Vec<f32>, Vec<f32>, Vec<f32>)
Expand description

qkv: [t, 3c] -> (q, k, v) each [h, t, hd], hd = c / h.