Skip to main content

collapse

Function collapse 

Source
pub fn collapse(
    e: &Engine,
    topology: &HyperTopology,
    head: Option<&HyperHead>,
    x: &CudaSlice<f32>,
    t: usize,
    hidden: usize,
) -> Result<CudaSlice<f32>, Box<dyn Error>>
Expand description

Trunk exit: [tokens, streams, hidden] -> [tokens, hidden], keyed on the plan’s collapse. Mean is glm5_next’s unweighted mean (Glm5NextTextHyperHead); GatedHead is dsv4’s sigmoid-gated pre-only collapse (dsv4_forward::hc_head) and needs the head trio.