attention_any

Function attention_any 

Source
pub fn attention_any(
    x: &[f32],
    seqlen: usize,
    start_pos: usize,
    w: &AttnWeights<'_>,
    comp: Option<&CompressorWeights<'_>>,
    idxw: Option<&IndexerWeights<'_>>,
    icfg: &IndexerCfg,
    c: &CompAttnCfg,
    fc: &[(f32, f32)],
    st: &mut LayerAttnState,
    shared: &mut SharedRuntime,
) -> CompAttnRun
Expand description

Attention.forward for any compress_ratio, mutating the layer state and the shared slots.