[NPU] enhance accuracy for model minimaxm2 from 16.5% to 95.5% (#17695)

This commit is contained in:
McZyWu
2026-03-23 19:06:38 +08:00
committed by GitHub
parent 2d288ba8c9
commit 4641e5a3d2
3 changed files with 45 additions and 1 deletions

View File

@@ -26,7 +26,7 @@ def fused_topk_npu(
renormalize = topk_config.renormalize
correction_bias = topk_config.correction_bias
if not use_grouped_topk:
if not use_grouped_topk and correction_bias is None:
topk_weights, topk_ids, _ = torch.ops.npu.npu_moe_gating_top_k_softmax(
router_logits,
k=topk_config.top_k,

View File

@@ -148,6 +148,7 @@ STABLELM_2_1_6B_WEIGHTS_PATH = os.path.join(
MODEL_WEIGHTS_DIR, "stabilityai/stablelm-2-1_6b"
)
XVERSE_MOE_A36B_WEIGHTS_PATH = os.path.join(MODEL_WEIGHTS_DIR, "xverse/XVERSE-MoE-A36B")
MINIMAX_M2_WEIGHTS_PATH = os.path.join(MODEL_WEIGHTS_DIR, "cyankiwi/MiniMax-M2-BF16")
# VLM model weights path
DEEPSEEK_VL2_WEIGHTS_PATH = os.path.join(MODEL_WEIGHTS_DIR, "deepseek-ai/deepseek-vl2")