flashinfer.mhc

Multi-head residual Combination (mHC) kernels used by Agentic-style residual mixing with a fixed HC=4 sub-head layout.

mhc_post(x, residual, post_layer_mix, ...)

Apply mHC post mapping for HC=4.

mhc_pre_big_fuse(dot_mix, sqrsum, residual, ...)

Apply mHC pre-map big-fuse using external projection and sqrsum.

mhc_pre_big_fuse_with_prenorm(dot_mix, ...)

Apply mHC pre-map big-fuse and compute RMS sqrsum from residual.