vllm.models.deepseek_v41.nvidia.ops.mega_mhc ¶
Functions:
-
is_mega_mhc_supported–Return whether DeepGEMM can run the DSV4.1 shifted mHC kernel.
-
mhc_shifted_post_pre–Use Mega-mHC for carried mixing, retaining TileLang for aux capture.
-
mhc_shifted_post_pre_deep_gemm–Run DSV4.1 shifted post, next pre, and BF16 RMSNorm with Mega mHC.
is_mega_mhc_supported(hidden_size, hc_mult) cached ¶
Return whether DeepGEMM can run the DSV4.1 shifted mHC kernel.
Source code in vllm/models/deepseek_v41/nvidia/ops/mega_mhc.py
mhc_shifted_post_pre(x, residual, post_layer_mix, comb_res_mix, fn, hc_scale, hc_base, rms_eps, hc_pre_eps, hc_sinkhorn_eps, hc_post_mult_value, sinkhorn_repeat, pre_mix=None, norm_weight=None, norm_eps=1e-06, capture_aux=False) ¶
Use Mega-mHC for carried mixing, retaining TileLang for aux capture.
Source code in vllm/models/deepseek_v41/nvidia/ops/mega_mhc.py
mhc_shifted_post_pre_deep_gemm(x, residual, shifted_prev_mix, post_mix, comb_res_mix, fn, mix_scales, mix_bases, hc_norm_eps, hc_pre_eps, hc_post_scale, sinkhorn_eps, num_sinkhorn_iters, rmsnorm_weight, rmsnorm_eps) ¶
Run DSV4.1 shifted post, next pre, and BF16 RMSNorm with Mega mHC.