Add pr tests (#31952)

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: sglang-npu-bot <sglangnpu@163.com>
Co-authored-by: Cherry_ming <136634645@qq.com>
This commit is contained in:
Sugar920
2026-08-01 15:03:21 +08:00
committed by GitHub
co-authored by Claude sglang-npu-bot Cherry_ming
parent fd96a35fb0
commit 33ecf4bcd8
170 changed files with 1968 additions and 329 deletions
+1 -1
View File
@@ -18,6 +18,6 @@ Tests under this directory are auto-discovered by `run_suite.py` via CI registra
| Model inference correctness | `models/`, `4-gpu-models/`, `8-gpu-models/` | GPU |
| Feature-specific (OpenAI API, LoRA, speculative, distributed, VLM, etc.) | `openai_server/`, `lora/`, `spec/`, `distributed/`, ... | GPU |
| Benchmarks (performance, accuracy, stress) | `benchmark/` | GPU |
| Platform-specific | `amd/`, `ascend/` | Vendor GPU |
| Platform-specific | `amd/`, `npu/` | Vendor GPU |
See [`unit/README.md`](unit/README.md) for unit test conventions.
@@ -5,10 +5,7 @@ from sglang.test.ascend.e2e.test_npu_accuracy_utils import (
)
from sglang.test.ascend.e2e.test_npu_multi_node_utils import NIC_NAME
from sglang.test.ascend.e2e.test_npu_performance_utils import (
AISBENCHMARK_DATASET_DEFAULT,
BENCHMARK_TOOL_DEFAULT,
GLM_5_1_W4A8_MODEL_PATH,
TestNpuPerfMultiNodePdSepTestCaseBase,
)
from sglang.test.ci.ci_register import register_npu_ci
@@ -16,7 +13,7 @@ register_npu_ci(
est_time=3600,
suite="",
nightly=True,
disabled="performance testcase",
disabled="accuracy testcase",
)
GLM_5_1_PD_SEP_PREFILL_ENVS = {
@@ -181,26 +178,5 @@ class TestNPUGLM5_1_W4A8_PD_SEP_AIME2026(TestNpuAccuracyMultiNodePdSepTestCaseBa
self.run_accuracy()
class TestNPUGLM5_1_W4A8_PD_SEP_In3k5_Out1k5(TestNpuPerfMultiNodePdSepTestCaseBase):
"""Test NPU performance for GLM-5.1-w4a8 PD separation 4 nodes in3k5 out1k5"""
model_config = GLM_5_1_PD_SEP_MODEL_CONFIG
benchmark_tool = BENCHMARK_TOOL_DEFAULT
dataset_type = AISBENCHMARK_DATASET_DEFAULT
dataset_name = "random"
max_concurrency = 1
num_prompts = 1
input_len = 65536
output_len = 1024
random_range_ratio = 1
seed = 1
tpot = 50
output_token_throughput = 160
def test_npu_glm5_1_w4a8_pd_sep_in3k5_out1k5(self):
"""Run NPU performance test for GLM-5.1-w4a8 PD separation"""
self.run_throughput()
if __name__ == "__main__":
unittest.main()
@@ -5,11 +5,8 @@ from sglang.test.ascend.e2e.test_npu_accuracy_utils import (
)
from sglang.test.ascend.e2e.test_npu_multi_node_utils import NIC_NAME
from sglang.test.ascend.e2e.test_npu_performance_utils import (
AISBENCHMARK_DATASET_DEFAULT,
BENCHMARK_TOOL_DEFAULT,
KIMI_K2_6_EAGLE3_MODEL_PATH,
KIMI_K2_6_W4A8_MODEL_PATH,
TestNpuPerfMultiNodePdMixTestCaseBase,
)
from sglang.test.ci.ci_register import register_npu_ci
@@ -17,7 +14,7 @@ register_npu_ci(
est_time=1800,
suite="nightly-8-npu-a3",
nightly=True,
disabled="Currently it is executed by the npu performance workflow.",
disabled="accuracy testcase",
)
ENVS = {
@@ -107,23 +104,5 @@ class TestNPUKimiK2_6_W4A8_16P_AIME2025(TestNpuAccuracyMultiNodePdMixTestCaseBas
self.run_accuracy()
class TestNPUKimiK2_6_W4A8_16P_In64k_Out1k_100ms(TestNpuPerfMultiNodePdMixTestCaseBase):
benchmark_tool = BENCHMARK_TOOL_DEFAULT
dataset_type = AISBENCHMARK_DATASET_DEFAULT
model_config = MODEL_CONFIG
dataset_name = "random"
max_concurrency = 32
num_prompts = 32
input_len = 64000
output_len = 1000
random_range_ratio = 1
seed = 1
tpot = 100
output_token_throughput = 160
def test_npu_kimi_k2_6_w4a8_16p_in64k_out1k_100ms(self):
self.run_throughput()
if __name__ == "__main__":
unittest.main()
@@ -0,0 +1,109 @@
import os
import unittest
from sglang.test.ascend.e2e.test_npu_accuracy_utils import (
TestNpuAccuracyTestCaseBase,
)
from sglang.test.ascend.e2e.test_npu_performance_utils import (
MINIMAX_M2_5_EAGLE3_MODEL_PATH,
MINIMAX_M2_5_W8A8_MODEL_PATH,
)
from sglang.test.ci.ci_register import register_npu_ci
register_npu_ci(
est_time=3600,
suite="",
nightly=True,
disabled="accuracy testcase",
)
MINIMAX_M2_5_W8A8_4P_IN64K_OUT1K_PREFIX90_ENVS = {
"PYTORCH_NPU_ALLOC_CONF": "expandable_segments:True",
"STREAMS_PER_DEVICE": "32",
"HCCL_SOCKET_IFNAME": "lo",
"GLOO_SOCKET_IFNAME": "lo",
"TASK_QUEUE_ENABLE": "1",
"ASCEND_USE_FIA": "1",
"SGLANG_SET_CPU_AFFINITY": "1",
"SGLANG_ENABLE_OVERLAP_PLAN_STREAM": "1",
"SGLANG_NPU_FUSED_MOE_MODE": "2",
"SGLANG_DEEPEP_NUM_MAX_DISPATCH_TOKENS_PER_RANK": "140000",
"DEEP_NORMAL_MODE_USE_INT8_QUANT": "1",
"DEEPEP_HCCL_BUFFSIZE": "1024",
"SGLANG_EXTERNAL_MODEL_PACKAGE": "custom_eagle3",
"PYTHONPATH": f"{MINIMAX_M2_5_EAGLE3_MODEL_PATH}:{os.environ.get('PYTHONPATH', '')}",
}
MINIMAX_M2_5_W8A8_4P_IN64K_OUT1K_PREFIX90_OTHER_ARGS = [
"--tp-size",
8,
"--mem-fraction-static",
0.63,
"--max-running-requests",
26,
"--reasoning-parser",
"minimax-append-think",
"--tool-call-parser",
"minimax-m2",
"--enable-prefill-delayer",
"--prefill-max-requests",
10,
"--chunked-prefill-size",
67072,
"--max-prefill-token",
67000,
"--cuda-graph-bs",
2,
4,
8,
12,
16,
18,
20,
22,
24,
26,
"--moe-a2a-backend",
"ascend_fuseep",
"--deepep-mode",
"auto",
"--quantization",
"modelslim",
"--speculative-algorithm",
"EAGLE3",
"--speculative-draft-model-path",
MINIMAX_M2_5_EAGLE3_MODEL_PATH,
"--speculative-num-steps",
3,
"--speculative-eagle-topk",
1,
"--speculative-num-draft-tokens",
4,
"--speculative-draft-model-quantization",
"unquant",
"--dtype",
"bfloat16",
"--trust-remote-code",
"--reasoning-parser",
"minimax-append-think",
"--tool-call-parser",
"minimax-m2",
]
class TestNPUMiniMaxM2_5_W8A8_4P_Gpqa(TestNpuAccuracyTestCaseBase):
model = MINIMAX_M2_5_W8A8_MODEL_PATH
other_args = MINIMAX_M2_5_W8A8_4P_IN64K_OUT1K_PREFIX90_OTHER_ARGS
envs = MINIMAX_M2_5_W8A8_4P_IN64K_OUT1K_PREFIX90_ENVS
accuracy = 0.852
datasets = ["gpqa_diamond"]
few_shot_num = 0
generation_config = {"max_tokens": 65536, "temperature": 1.0}
eval_batch_size = 64
def test_accuracy(self):
self.run_accuracy()
if __name__ == "__main__":
unittest.main()
@@ -0,0 +1,107 @@
import os
import unittest
from sglang.test.ascend.e2e.test_npu_accuracy_utils import (
TestNpuAccuracyTestCaseBase,
)
from sglang.test.ascend.e2e.test_npu_performance_utils import (
MINIMAX_M2_5_EAGLE3_MODEL_PATH,
MINIMAX_M2_5_W8A8_MODEL_PATH,
)
from sglang.test.ci.ci_register import register_npu_ci
register_npu_ci(
est_time=3600,
suite="full-16-npu-a3",
nightly=True,
disabled="accuracy testcase",
)
MINIMAX_M2_5_HIGH_THROUGHPUT_ENVS = {
"PYTORCH_NPU_ALLOC_CONF": "expandable_segments:True",
"STREAMS_PER_DEVICE": "32",
"HCCL_SOCKET_IFNAME": "lo",
"GLOO_SOCKET_IFNAME": "lo",
"TASK_QUEUE_ENABLE": "1",
"DEEPEP_HCCL_BUFFSIZE": "1024",
"ASCEND_USE_FIA": "1",
"SGLANG_SET_CPU_AFFINITY": "1",
"SGLANG_ENABLE_OVERLAP_PLAN_STREAM": "1",
"SGLANG_DEEPEP_NUM_MAX_DISPATCH_TOKENS_PER_RANK": "204800",
"PYTHONPATH": f"{MINIMAX_M2_5_EAGLE3_MODEL_PATH}:{os.environ.get('PYTHONPATH', '')}",
"SGLANG_EXTERNAL_MODEL_PACKAGE": "custom_eagle3",
}
MINIMAX_M2_5_HIGH_THROUGHPUT_OTHER_ARGS = [
"--tp-size",
16,
"--enable-dp-attention",
"--dp-size",
16,
"--mem-fraction-static",
0.75,
"--max-running-requests",
320,
"--disable-radix-cache",
"--reasoning-parser",
"minimax-append-think",
"--tool-call-parser",
"minimax-m2",
"--prefill-delayer-max-delay-passes",
500,
"--enable-prefill-delayer",
"--chunked-prefill-size",
196608,
"--max-prefill-token",
8192,
"--cuda-graph-bs",
1,
2,
4,
8,
12,
16,
20,
"--moe-a2a-backend",
"ascend_fuseep",
"--fuseep-mode",
2,
"--quantization",
"modelslim",
"--speculative-algorithm",
"EAGLE3",
"--speculative-draft-model-path",
MINIMAX_M2_5_EAGLE3_MODEL_PATH,
"--speculative-num-steps",
3,
"--speculative-eagle-topk",
1,
"--speculative-num-draft-tokens",
4,
"--speculative-draft-model-quantization",
"unquant",
"--dtype",
"bfloat16",
"--reasoning-parser",
"minimax-append-think",
"--tool-call-parser",
"minimax-m2",
]
class TestNPUMiniMaxM2_5_W8A8_8P_In3k5_Out1k5_GPQA(TestNpuAccuracyTestCaseBase):
model = MINIMAX_M2_5_W8A8_MODEL_PATH
envs = MINIMAX_M2_5_HIGH_THROUGHPUT_ENVS
other_args = MINIMAX_M2_5_HIGH_THROUGHPUT_OTHER_ARGS
accuracy = 0.852
datasets = ["gpqa_diamond"]
few_shot_num = 0
generation_config = {"max_tokens": 65536, "temperature": 1.0}
eval_batch_size = 64
def test_accuracy(self):
self.run_accuracy()
if __name__ == "__main__":
unittest.main()
@@ -4,11 +4,8 @@ from sglang.test.ascend.e2e.test_npu_accuracy_utils import (
TestNpuAccuracyTestCaseBase,
)
from sglang.test.ascend.e2e.test_npu_performance_utils import (
AISBENCHMARK_DATASET_DEFAULT,
BENCHMARK_TOOL_DEFAULT,
QWEN3_8B_EAGLE_MODEL_PATH,
QWEN3_8B_W8A8_MODEL_PATH,
TestNpuPerformanceTestCaseBase,
)
from sglang.test.ci.ci_register import register_npu_ci
@@ -16,7 +13,7 @@ register_npu_ci(
est_time=3600,
suite="",
nightly=True,
disabled="performance testcase",
disabled="accuracy testcase",
)
QWEN3_8B_ENVS = {
@@ -88,26 +85,6 @@ QWEN3_8B_OTHER_ARGS = [
]
class TestQwen8B(TestNpuPerformanceTestCaseBase):
benchmark_tool = BENCHMARK_TOOL_DEFAULT
dataset_type = AISBENCHMARK_DATASET_DEFAULT
model = QWEN3_8B_W8A8_MODEL_PATH
other_args = QWEN3_8B_OTHER_ARGS
envs = QWEN3_8B_ENVS
dataset_name = "random"
max_concurrency = 64
num_prompts = 256
input_len = 3500
output_len = 1500
random_range_ratio = 1
seed = 1
tpot = 37
output_token_throughput = 1586
def test_qwen3_8b(self):
self.run_throughput()
class TestQwen8B_gpqa(TestNpuAccuracyTestCaseBase):
model = QWEN3_8B_W8A8_MODEL_PATH
envs = QWEN3_8B_ENVS
@@ -6,7 +6,6 @@ from sglang.test.ascend.e2e.test_npu_accuracy_utils import (
from sglang.test.ascend.e2e.test_npu_performance_utils import (
QWEN3_8B_EAGLE_MODEL_PATH,
QWEN3_8B_W8A8_MODEL_PATH,
TestNpuPerformanceTestCaseBase,
)
from sglang.test.ci.ci_register import register_npu_ci
@@ -14,7 +13,7 @@ register_npu_ci(
est_time=3600,
suite="",
nightly=True,
disabled="performance testcase",
disabled="accuracy testcase",
)
QWEN3_8B_ENVS = {
@@ -75,24 +74,6 @@ QWEN3_8B_OTHER_ARGS = [
]
class TestQwen8B(TestNpuPerformanceTestCaseBase):
max_attempts = 5
model = QWEN3_8B_W8A8_MODEL_PATH
other_args = QWEN3_8B_OTHER_ARGS
envs = QWEN3_8B_ENVS
dataset_name = "random"
max_concurrency = 16
num_prompts = 16
input_len = 6144
output_len = 1500
random_range_ratio = 1
tpot = 11.79
output_token_throughput = 1040.96
def test_qwen3_8b(self):
self.run_throughput()
class TestQwen8B_gpqa(TestNpuAccuracyTestCaseBase):
model = QWEN3_8B_W8A8_MODEL_PATH
envs = QWEN3_8B_ENVS
@@ -4,11 +4,8 @@ from sglang.test.ascend.e2e.test_npu_accuracy_utils import (
TestNpuAccuracyTestCaseBase,
)
from sglang.test.ascend.e2e.test_npu_performance_utils import (
AISBENCHMARK_DATASET_DEFAULT,
BENCHMARK_TOOL_DEFAULT,
QWEN3_30B_A3B_W8A8_VLLM_MODEL_PATH,
QWEN3_A3B_EAGLE_MODEL_PATH,
TestNpuPerformanceTestCaseBase,
)
from sglang.test.ci.ci_register import register_npu_ci
@@ -16,7 +13,7 @@ register_npu_ci(
est_time=3600,
suite="",
nightly=True,
disabled="performance testcase",
disabled="accuracy testcase",
)
QWEN3_30B_A3B_ENVS = {
@@ -93,26 +90,6 @@ QWEN3_30B_A3B_OTHER_ARGS = [
]
class TestQwen30B(TestNpuPerformanceTestCaseBase):
benchmark_tool = BENCHMARK_TOOL_DEFAULT
dataset_type = AISBENCHMARK_DATASET_DEFAULT
model = QWEN3_30B_A3B_W8A8_VLLM_MODEL_PATH
other_args = QWEN3_30B_A3B_OTHER_ARGS
envs = QWEN3_30B_A3B_ENVS
dataset_name = "random"
max_concurrency = 160
num_prompts = int(max_concurrency) * 4
input_len = 3500
output_len = 1500
random_range_ratio = 1
seed = 1
tpot = 50
output_token_throughput = 3200
def test_qwen3_30b(self):
self.run_throughput()
class TestQwen30B_A3B_aime25(TestNpuAccuracyTestCaseBase):
model = QWEN3_30B_A3B_W8A8_VLLM_MODEL_PATH
envs = QWEN3_30B_A3B_ENVS
@@ -4,11 +4,8 @@ from sglang.test.ascend.e2e.test_npu_accuracy_utils import (
TestNpuAccuracyTestCaseBase,
)
from sglang.test.ascend.e2e.test_npu_performance_utils import (
AISBENCHMARK_DATASET_DEFAULT,
BENCHMARK_TOOL_DEFAULT,
QWEN3_32B_EAGLE_MODEL_PATH,
QWEN3_32B_W8A8_MODEL_PATH,
TestNpuPerformanceTestCaseBase,
)
from sglang.test.ci.ci_register import register_npu_ci
@@ -16,7 +13,7 @@ register_npu_ci(
est_time=3600,
suite="",
nightly=True,
disabled="performance testcase",
disabled="accuracy testcase",
)
QWEN3_32B_ENVS = {
@@ -90,27 +87,7 @@ QWEN3_32B_OTHER_ARGS = [
]
class TestQwen32B(TestNpuPerformanceTestCaseBase):
benchmark_tool = BENCHMARK_TOOL_DEFAULT
dataset_type = AISBENCHMARK_DATASET_DEFAULT
model = QWEN3_32B_W8A8_MODEL_PATH
other_args = QWEN3_32B_OTHER_ARGS
envs = QWEN3_32B_ENVS
dataset_name = "random"
max_concurrency = 100
num_prompts = 400
input_len = 3584
output_len = 1536
random_range_ratio = 1
seed = 1
tpot = 50
output_token_throughput = 1600
def test_qwen3_32b(self):
self.run_throughput()
class TestQwen32B_mmlupro(TestNpuAccuracyTestCaseBase):
class TestQwen32B_gpqa(TestNpuAccuracyTestCaseBase):
model = QWEN3_32B_W8A8_MODEL_PATH
envs = QWEN3_32B_ENVS
other_args = QWEN3_32B_OTHER_ARGS
@@ -0,0 +1,108 @@
import unittest
from sglang.test.ascend.e2e.test_npu_accuracy_utils import (
TestNpuAccuracyTestCaseBase,
)
from sglang.test.ascend.e2e.test_npu_performance_utils import (
QWEN3_32B_EAGLE_MODEL_PATH,
QWEN3_32B_W8A8_MODEL_PATH,
)
from sglang.test.ci.ci_register import register_npu_ci
register_npu_ci(
est_time=3600,
suite="",
nightly=True,
disabled="accuracy testcase",
)
QWEN3_32B_ENVS = {
"SGLANG_DISAGGREGATION_BOOTSTRAP_TIMEOUT": "600",
"PYTORCH_NPU_ALLOC_CONF": "expandable_segments:True",
"HCCL_SOCKET_IFNAME": "lo",
"GLOO_SOCKET_IFNAME": "lo",
"HCCL_OP_EXPANSION_MODE": "AIV",
"SGLANG_ENABLE_OVERLAP_PLAN_STREAM": "1",
"SGLANG_SCHEDULER_DECREASE_PREFILL_IDLE": "1",
"SGLANG_PREFILL_DELAYER_MAX_DELAY_PASSES": "100",
"SGLANG_NPU_USE_DEEPGEMM": "1",
}
QWEN3_32B_OTHER_ARGS = [
"--trust-remote-code",
"--nnodes",
"1",
"--node-rank",
"0",
"--attention-backend",
"ascend",
"--device",
"npu",
"--quantization",
"modelslim",
"--max-running-requests",
101,
"--disable-radix-cache",
"--speculative-draft-model-quantization",
"unquant",
"--chunked-prefill-size",
-1,
"--max-prefill-tokens",
35000,
"--speculative-algorithm",
"EAGLE3",
"--speculative-draft-model-path",
QWEN3_32B_EAGLE_MODEL_PATH,
"--speculative-num-steps",
3,
"--speculative-eagle-topk",
1,
"--speculative-num-draft-tokens",
4,
"--tp-size",
4,
"--mem-fraction-static",
0.845,
"--cuda-graph-bs",
16,
32,
64,
72,
88,
90,
92,
94,
96,
97,
98,
99,
100,
101,
"--dtype",
"bfloat16",
"--reasoning-parser",
"qwen3",
"--tool-call-parser",
"qwen",
]
class TestQwen32B_GPQA(TestNpuAccuracyTestCaseBase):
"""Test NPU accuracy for Qwen3-32B-W8A8 on qpqa"""
model = QWEN3_32B_W8A8_MODEL_PATH
other_args = QWEN3_32B_OTHER_ARGS
envs = QWEN3_32B_ENVS
accuracy = 0.4949
datasets = ["gpqa_diamond"]
few_shot_num = 0
eval_batch_size = 64
generation_config = {"max_tokens": 40000, "temperature": 1.0}
def test_qwen3_32b_qpqa(self):
"""Run NPU accuracy test for Qwen3-32B-W8A8 on qpqa"""
self.run_accuracy()
if __name__ == "__main__":
unittest.main()
@@ -0,0 +1,106 @@
import unittest
from sglang.test.ascend.e2e.test_npu_accuracy_utils import (
TestNpuAccuracyTestCaseBase,
)
from sglang.test.ascend.e2e.test_npu_performance_utils import (
QWEN3_6_27B_W8A8_MODEL_PATH,
)
from sglang.test.ci.ci_register import register_npu_ci
register_npu_ci(
est_time=3600,
suite="full-2-npu-a3",
nightly=True,
disabled="accuracy testcase",
)
QWEN3_6_27B_3K5_1K5_ENVS = {
"PYTORCH_NPU_ALLOC_CONF": "expandable_segments:True",
"STREAMS_PER_DEVICE": "32",
"HCCL_SOCKET_IFNAME": "lo",
"GLOO_SOCKET_IFNAME": "lo",
"HCCL_OP_EXPANSION_MODE": "AIV",
"SGLANG_SET_CPU_AFFINITY": "1",
"SGLANG_ENABLE_OVERLAP_PLAN_STREAM": "0",
"SGLANG_SCHEDULER_DECREASE_PREFILL_IDLE": "1",
"SGLANG_PREFILL_DELAYER_MAX_DELAY_PASSES": "130",
"ASCEND_USE_FIA": "1",
}
QWEN3_6_27B_3K5_1K5_OTHER_ARGS = [
"--tp-size",
2,
"--nnodes",
1,
"--attention-backend",
"ascend",
"--device",
"npu",
"--chunked-prefill-size",
-1,
"--max-prefill-tokens",
60000,
"--disable-radix-cache",
"--trust-remote-code",
"--max-running-requests",
64,
"--max-mamba-cache-size",
74,
"--mem-fraction-static",
0.7,
"--cuda-graph-bs",
2,
8,
16,
32,
40,
45,
50,
54,
"--enable-multimodal",
"--quantization",
"modelslim",
"--mm-attention-backend",
"ascend_attn",
"--dtype",
"bfloat16",
"--mamba-ssm-dtype",
"bfloat16",
"--speculative-algorithm",
"NEXTN",
"--speculative-num-steps",
3,
"--speculative-eagle-topk",
1,
"--speculative-num-draft-tokens",
4,
"--reasoning-parser",
"qwen3",
"--tool-call-parser",
"qwen3_coder",
]
class TestNPUQwen3_6_27B_1P_In3k5_Out1k5_gpqa(TestNpuAccuracyTestCaseBase):
model = QWEN3_6_27B_W8A8_MODEL_PATH
envs = QWEN3_6_27B_3K5_1K5_ENVS
other_args = QWEN3_6_27B_3K5_1K5_OTHER_ARGS
accuracy = 0.878
datasets = ["gpqa_diamond"]
few_shot_num = 0
eval_batch_size = 8
generation_config = {
"max_tokens": 81920,
"temperature": 1.0,
"extra_body": {
"chat_template_kwargs": {"enable_thinking": True},
},
}
def test_accuracy(self):
self.run_accuracy()
if __name__ == "__main__":
unittest.main()
@@ -0,0 +1,107 @@
import unittest
from sglang.test.ascend.e2e.test_npu_accuracy_utils import (
TestNpuAccuracyTestCaseBase,
)
from sglang.test.ascend.e2e.test_npu_performance_utils import (
QWEN3_6_35B_A3B_MODEL_PATH,
)
from sglang.test.ci.ci_register import register_npu_ci
register_npu_ci(
est_time=3600,
suite="",
nightly=True,
disabled="accuracy testcase",
)
QWEN3_6_35B_A3B_64K_PREFIX_ENVS = {
"PYTORCH_NPU_ALLOC_CONF": "expandable_segments:True",
"STREAMS_PER_DEVICE": "32",
"DEEPEP_HCCL_BUFFSIZE": "300",
"HCCL_SOCKET_IFNAME": "lo",
"GLOO_SOCKET_IFNAME": "lo",
"HCCL_OP_EXPANSION_MODE": "AIV",
"SGLANG_SET_CPU_AFFINITY": "1",
"SGLANG_ENABLE_OVERLAP_PLAN_STREAM": "0",
"ASCEND_USE_FIA": "1",
"GDN_ATTN_BACKEND_TRITON": "1",
}
QWEN3_6_35B_A3B_64K_PREFIX_OTHER_ARGS = [
"--tp-size",
2,
"--nnodes",
1,
"--attention-backend",
"ascend",
"--device",
"npu",
"--chunked-prefill-size",
-1,
"--max-total-tokens",
470784,
"--max-prefill-tokens",
65536,
"--trust-remote-code",
"--mamba-scheduler-strategy",
"extra_buffer",
"--max-running-requests",
40,
"--max-mamba-cache-size",
200,
"--mem-fraction-static",
0.9,
"--cuda-graph-bs",
2,
8,
16,
24,
32,
36,
40,
"--enable-multimodal",
"--mm-attention-backend",
"ascend_attn",
"--dtype",
"bfloat16",
"--mamba-ssm-dtype",
"bfloat16",
"--speculative-algorithm",
"NEXTN",
"--speculative-num-steps",
3,
"--speculative-eagle-topk",
1,
"--speculative-num-draft-tokens",
4,
"--reasoning-parser",
"qwen3",
"--tool-call-parser",
"qwen3_coder",
]
class TestNPUQwen3_6_35BA3B_1P_AIME2026(TestNpuAccuracyTestCaseBase):
"""Test NPU accuracy for Qwen3.6-35B-A3B 1p on AIME2026"""
model = QWEN3_6_35B_A3B_MODEL_PATH
other_args = QWEN3_6_35B_A3B_64K_PREFIX_OTHER_ARGS
envs = QWEN3_6_35B_A3B_64K_PREFIX_ENVS
accuracy = 0.927
datasets = ["aime26"]
few_shot_num = 0
eval_batch_size = 64
generation_config = {
"max_tokens": 65536,
"temperature": 0.2,
"repetition_penalty": 1.08,
}
def test_npu_qwen3_6_35b_a3b_1p_aime2026(self):
"""Run NPU accuracy test for Qwen3.6-35B-A3B on AIME2026"""
self.run_accuracy()
if __name__ == "__main__":
unittest.main()
@@ -6,7 +6,6 @@ from sglang.test.ascend.e2e.test_npu_accuracy_utils import (
from sglang.test.ascend.e2e.test_npu_performance_utils import (
QWEN3_NEXT_80B_A3B_MODEL_PATH,
QWEN3_NEXT_80B_A3B_W8A8_MODEL_PATH,
TestNpuPerformanceTestCaseBase,
)
from sglang.test.ci.ci_register import register_npu_ci
@@ -14,7 +13,7 @@ register_npu_ci(
est_time=3600,
suite="",
nightly=True,
disabled="performance testcase",
disabled="accuracy testcase",
)
QWEN3_NEXT_80B_A3B_ENVS = {
@@ -97,23 +96,6 @@ QWEN3_NEXT_80B_A3B_OTHER_ARGS = [
]
class TestQwen3Next80BA3B(TestNpuPerformanceTestCaseBase):
max_attempts = 5
model = QWEN3_NEXT_80B_A3B_W8A8_MODEL_PATH
other_args = QWEN3_NEXT_80B_A3B_OTHER_ARGS
envs = QWEN3_NEXT_80B_A3B_ENVS
dataset_name = "random"
max_concurrency = 16
num_prompts = 16
input_len = 6144
output_len = 1500
random_range_ratio = 1
tpot = 15.62
def test_qwen3_next_80b_a3b(self):
self.run_throughput()
class TestQwen3Next80BA3B_aime25(TestNpuAccuracyTestCaseBase):
model = QWEN3_NEXT_80B_A3B_W8A8_MODEL_PATH
envs = QWEN3_NEXT_80B_A3B_ENVS
@@ -1,3 +1,4 @@
import os
import unittest
from sglang.test.ascend.e2e.test_npu_accuracy_utils import (
@@ -15,6 +16,8 @@ register_npu_ci(
disabled="performance testcase",
)
_is_pr_pipeline = os.environ.get("GITHUB_EVENT_NAME") == "pull_request"
ENVS = {
"SGLANG_DISAGGREGATION_BOOTSTRAP_TIMEOUT": "600",
"PYTORCH_NPU_ALLOC_CONF": "expandable_segments:True",
@@ -57,9 +60,10 @@ class TestQwen3(TestNpuAccuracyTestCaseBase):
model = QWEN3_VL_8B_THINKING_MODEL_PATH
envs = ENVS
other_args = OTHER_ARGS
accuracy = 0.7011
accuracy = 0.64 if _is_pr_pipeline else 0.7011
datasets = ["mmmu"]
few_shot_num = 0
limit = 5 if _is_pr_pipeline else 100000
generation_config = {"max_tokens": 65536}
eval_batch_size = 64
@@ -12,8 +12,7 @@ from sglang.test.test_utils import (
popen_launch_server,
)
register_npu_ci(est_time=400, suite="stage-b-test-1-npu-a2", nightly=False)
register_npu_ci(est_time=400, suite="nightly-1-npu-a3", nightly=True)
register_npu_ci(est_time=400, suite="full-1-npu-a3", nightly=True)
TEST_MODEL_MATRIX = {
"/root/.cache/modelscope/hub/models/Qwen/Qwen2.5-7B-Instruct": {
@@ -12,8 +12,7 @@ from sglang.test.test_utils import (
popen_launch_server,
)
register_npu_ci(est_time=400, suite="stage-b-test-2-npu-a2", nightly=False)
register_npu_ci(est_time=400, suite="nightly-2-npu-a3", nightly=True)
register_npu_ci(est_time=400, suite="full-2-npu-a3", nightly=True)
TEST_MODEL_MATRIX = {
"/root/.cache/modelscope/hub/models/Qwen/Qwen2.5-7B-Instruct": {
@@ -10,7 +10,6 @@ from sglang.test.ascend.test_ascend_utils import (
from sglang.test.ci.ci_register import register_npu_ci
from sglang.test.few_shot_gsm8k import run_eval as run_eval_few_shot_gsm8k
from sglang.test.test_utils import (
DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
DEFAULT_URL_FOR_TEST,
CustomTestCase,
popen_launch_server,
@@ -53,7 +52,7 @@ class TestAscendAutoRoundMoE(CustomTestCase):
process = popen_launch_server(
model,
self.base_url,
timeout=DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
timeout=3600,
other_args=[
*self.common_args,
],

Some files were not shown because too many files have changed in this diff Show More