From 3df6e2f9681a5f926d3b73286d19de9fa76b44a2 Mon Sep 17 00:00:00 2001 From: iridiumine <42236072+iridiumine@users.noreply.github.com> Date: Mon, 15 Jun 2026 19:57:49 +0800 Subject: [PATCH] [NPU] Add MiMo-V2-Flash manual testcases (#28223) --- .../sglang/test/ascend/test_ascend_utils.py | 1 + .../llm_models/test_npu_mimo_v2_flash.py | 39 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 test/manual/ascend/llm_models/test_npu_mimo_v2_flash.py diff --git a/python/sglang/test/ascend/test_ascend_utils.py b/python/sglang/test/ascend/test_ascend_utils.py index c711d6dad..ac503f4d1 100644 --- a/python/sglang/test/ascend/test_ascend_utils.py +++ b/python/sglang/test/ascend/test_ascend_utils.py @@ -108,6 +108,7 @@ META_LLAMA_3_1_8B_INSTRUCT = os.path.join( MODEL_WEIGHTS_DIR, "LLM-Research/Meta-Llama-3.1-8B-Instruct" ) MIMO_7B_RL_WEIGHTS_PATH = os.path.join(MODEL_WEIGHTS_DIR, "XiaomiMiMo/MiMo-7B-RL") +MIMO_V2_FLASH_WEIGHTS_PATH = os.path.join(MODEL_WEIGHTS_DIR, "XiaomiMiMo/MiMo-V2-Flash") MINICPM3_4B_WEIGHTS_PATH = os.path.join(MODEL_WEIGHTS_DIR, "OpenBMB/MiniCPM3-4B") MISTRAL_7B_INSTRUCT_V0_2_WEIGHTS_PATH = os.path.join( MODEL_WEIGHTS_DIR, "mistralai/Mistral-7B-Instruct-v0.2" diff --git a/test/manual/ascend/llm_models/test_npu_mimo_v2_flash.py b/test/manual/ascend/llm_models/test_npu_mimo_v2_flash.py new file mode 100644 index 000000000..337e30fa1 --- /dev/null +++ b/test/manual/ascend/llm_models/test_npu_mimo_v2_flash.py @@ -0,0 +1,39 @@ +import unittest + +from sglang.test.ascend.gsm8k_ascend_mixin import GSM8KAscendMixin +from sglang.test.ascend.test_ascend_utils import MIMO_V2_FLASH_WEIGHTS_PATH +from sglang.test.test_utils import CustomTestCase + + +class TestMiMoV2FlashGraphWithMTP(GSM8KAscendMixin, CustomTestCase): + """Testcase: Verify the inference accuracy of MiMo-V2-Flash on GSM8K with cuda graph and MTP (speculative decoding). + + [Test Category] Model + [Test Target] XiaomiMiMo/MiMo-V2-Flash + [Test Config] Prefill+Decode, cuda graph enabled, EAGLE speculative decoding + """ + + model = MIMO_V2_FLASH_WEIGHTS_PATH + accuracy = 0.9 + other_args = [ + "--trust-remote-code", + "--mem-fraction-static", + "0.8", + "--attention-backend", + "ascend", + "--tp-size", + "16", + "--speculative-algorithm", + "EAGLE", + "--speculative-num-steps", + "3", + "--speculative-eagle-topk", + "1", + "--speculative-num-draft-tokens", + "4", + "--enable-multi-layer-eagle", + ] + + +if __name__ == "__main__": + unittest.main()