hc_head_mean

Function hc_head_mean 

Source
pub fn hc_head_mean(
    gpu: &dyn GpuBackend,
    kernel: KernelHandle,
    streams: DevicePtr,
    y_out: DevicePtr,
    num_tokens: u32,
    hidden_size: u32,
    hc_mult: u32,
    stream: u64,
) -> Result<()>
Expand description

Final collapse before the LM head: an unweighted mean over the hc_mult streams.

🔴 Deliberately takes NO weight pointers. GLM’s Glm5NextTextHyperHead has no parameters and the checkpoint carries zero hc_head tensors; DeepSeek-V4’s ops::hc_head reads hc_head.{fn,base,scale}. The absent arguments are the guard against reaching for weights that do not exist.