pub fn load_moe_minimax(
store: &WeightStore,
layer_prefix: &str,
num_experts: usize,
gpu: &dyn GpuBackend,
config: &ModelConfig,
variant: Nvfp4Variant,
absmax_k: KernelHandle,
quantize_k: KernelHandle,
stream: u64,
) -> Result<MoeWeights>Expand description
2026-09-25: Load a MiniMax M2 MoE block.
Differences from load_moe_no_shared:
- Prefix
{layer}.block_sparse_moeinstead of{layer}.mlp. - Experts use
w1/w2/w3: w1 = gate_proj, w2 = down_proj, w3 = up_proj. e_score_correction_biasgoes intoMoeWeights.correction_bias, widened to F32 when it is BF16.
Like load_moe_no_shared it builds a zero-filled shared expert (packed
codes, scales and weight_scale_2 all 0), which contributes 0.