feat: sync npu nightly test improvements from Ascend testcases (#29403)

This commit is contained in:
hhhh1252023
2026-07-06 22:41:15 +08:00
committed by GitHub
parent 80decc78ec
commit 1b481deade
37 changed files with 708 additions and 235 deletions
@@ -25,6 +25,10 @@ OTHER_ARGS = [
"--quantization",
"modelslim",
"--disable-radix-cache",
"--reasoning-parser",
"deepseek-v3",
"--tool-call-parser",
"deepseekv32",
]
@@ -50,6 +50,10 @@ OTHER_ARGS = [
32,
"--watchdog-timeout",
9000,
"--reasoning-parser",
"glm45",
"--tool-call-parser",
"glm45",
]
@@ -50,6 +50,10 @@ OTHER_ARGS = [
32,
"--watchdog-timeout",
9000,
"--reasoning-parser",
"glm45",
"--tool-call-parser",
"glm47",
]
@@ -65,6 +65,10 @@ QWEN3_32B_OTHER_ARGS = [
64,
"--dtype",
"bfloat16",
"--reasoning-parser",
"qwen3",
"--tool-call-parser",
"qwen",
]
@@ -72,7 +76,7 @@ class TestQwen32B_GPQA(TestNpuAccuracyTestCaseBase):
model = QWEN3_32B_MODEL_PATH
envs = QWEN3_32B_ENVS
other_args = QWEN3_32B_OTHER_ARGS
accuracy = 0.516
accuracy = 0.4949
datasets = ["gpqa_diamond"]
few_shot_num = 0
eval_batch_size = 64
@@ -80,7 +80,7 @@ QWEN3_6_27B_64K_PREFIX_OTHER_ARGS = [
]
class TestNPUQwen3_6_27B_2P_In64k_Out1k_Prefix90_gpqa(TestNpuAccuracyTestCaseBase):
class TestNPUQwen3_6_27B_1P_In64k_Out1k_Prefix90_gpqa(TestNpuAccuracyTestCaseBase):
model = QWEN3_6_27B_MODEL_PATH
envs = QWEN3_6_27B_64K_PREFIX_ENVS
other_args = QWEN3_6_27B_64K_PREFIX_OTHER_ARGS
@@ -88,7 +88,13 @@ class TestNPUQwen3_6_27B_2P_In64k_Out1k_Prefix90_gpqa(TestNpuAccuracyTestCaseBas
datasets = ["gpqa_diamond"]
few_shot_num = 0
eval_batch_size = 64
generation_config = {"max_tokens": 81920, "temperature": 1.0}
generation_config = {
"max_tokens": 81920,
"temperature": 1.0,
"extra_body": {
"chat_template_kwargs": {"enable_thinking": True},
},
}
def test_gpqa(self):
self.run_accuracy()
@@ -71,6 +71,10 @@ QWEN3_6_35B_A3B_3K5_1K5_OTHER_ARGS = [
1,
"--speculative-num-draft-tokens",
4,
"--reasoning-parser",
"qwen3",
"--tool-call-parser",
"qwen3_coder",
]
@@ -84,7 +88,11 @@ class TestNPUQwen3_6_35BA3B_1P_In3k5_Out1k5_aime26(TestNpuAccuracyTestCaseBase):
eval_batch_size = 4
generation_config = {
"max_tokens": 131072,
"temperature": 0.2,
"temperature": 0.6,
"top_p": 0.95,
"top_k": 20,
"min_p": 0.0,
"presence_penalty": 0.0,
"repetition_penalty": 1.08,
}
@@ -16,71 +16,42 @@ register_npu_ci(
)
ENVS = {
"ASCEND_LAUNCH_BLOCKING": "0",
"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_ENABLE_SPEC_V2": "1",
"SGLANG_SCHEDULER_DECREASE_PREFILL_IDLE": "1",
"SGLANG_PREFILL_DELAYER_MAX_DELAY_PASSES": "200",
"HCCL_BUFFSIZE": "400",
"HCCL_BUFFSIZE": "2000",
}
OTHER_ARGS = [
"--trust-remote-code",
"--nnodes",
"1",
"--node-rank",
"0",
"--attention-backend",
"ascend",
"--device",
"npu",
"--max-running-requests",
162,
128,
"--disable-radix-cache",
# "--speculative-draft-model-quantization",
# "unquant",
"--chunked-prefill-size",
-1,
"--max-prefill-tokens",
35000,
# "--speculative-algorithm",
# "EAGLE3",
# "--speculative-draft-model-path",
# QWEN3_A3B_EAGLE_MODEL_PATH,
# "--speculative-num-steps",
# 3,
# "--speculative-eagle-topk",
# 1,
# "--speculative-num-draft-tokens",
# 4,
12800,
"--prefill-max-requests",
10,
"--tp-size",
2,
"--mem-fraction-static",
0.87,
"--cuda-graph-bs",
1,
5,
15,
40,
70,
100,
120,
130,
140,
146,
150,
154,
156,
158,
160,
162,
0.8,
"--dtype",
"bfloat16",
"--reasoning-parser",
"qwen3-thinking",
"--tool-call-parser",
"qwen",
"--enable-multimodal",
"--mm-attention-backend",
"ascend_attn",
]
@@ -91,7 +62,7 @@ class TestQwen3(TestNpuAccuracyTestCaseBase):
accuracy = 0.76
datasets = ["mmmu"]
few_shot_num = 0
generation_config = {"max_tokens": 65536, "temperature": 1.0}
generation_config = {"max_tokens": 65536}
eval_batch_size = 64
def test_mmmu(self):
@@ -21,22 +21,17 @@ ENVS = {
"HCCL_SOCKET_IFNAME": "lo",
"GLOO_SOCKET_IFNAME": "lo",
"HCCL_OP_EXPANSION_MODE": "AIV",
"SGLANG_ENABLE_OVERLAP_PLAN_STREAM": "1",
"SGLANG_ENABLE_SPEC_V2": "1",
"HCCL_BUFFSIZE": "2000",
}
OTHER_ARGS = [
"--trust-remote-code",
"--nnodes",
"1",
"--node-rank",
"0",
"--attention-backend",
"ascend",
"--device",
"npu",
"--max-running-requests",
16,
64,
"--max-prefill-tokens",
16384,
"--disable-radix-cache",
@@ -45,26 +40,16 @@ OTHER_ARGS = [
"--tp-size",
2,
"--mem-fraction-static",
0.894,
"--cuda-graph-bs",
1,
5,
15,
16,
0.8,
"--dtype",
"bfloat16",
# "--speculative-draft-model-quantization",
# "unquant",
# "--speculative-algorithm",
# "EAGLE3",
# "--speculative-draft-model-path",
# QWEN3_8B_EAGLE_MODEL_PATH,
# "--speculative-num-steps",
# 4,
# "--speculative-eagle-topk",
# 1,
# "--speculative-num-draft-tokens",
# 5,
"--reasoning-parser",
"qwen3-thinking",
"--tool-call-parser",
"qwen",
"--enable-multimodal",
"--mm-attention-backend",
"ascend_attn",
]
@@ -75,8 +60,8 @@ class TestQwen3(TestNpuAccuracyTestCaseBase):
accuracy = 0.741
datasets = ["mmmu"]
few_shot_num = 0
generation_config = {"max_tokens": 65536, "temperature": 1.0}
eval_batch_size = 16
generation_config = {"max_tokens": 65536}
eval_batch_size = 64
def test_mmmu(self):
self.run_accuracy()
@@ -97,6 +97,10 @@ GLM_5_1_PD_SEP_PREFILL_ARGS = [
1,
"--pp-size",
8,
"--reasoning-parser",
"glm45",
"--tool-call-parser",
"glm47",
]
GLM_5_1_PD_SEP_DECODE_ARGS = [
@@ -147,6 +151,10 @@ GLM_5_1_PD_SEP_DECODE_ARGS = [
"round_robin",
"--speculative-draft-model-quantization",
"unquant",
"--reasoning-parser",
"glm45",
"--tool-call-parser",
"glm47",
]
GLM_5_1_PD_SEP_MODEL_CONFIG = {
@@ -187,7 +195,7 @@ class TestNPUGLM5_1_W4A8_PD_SEP_In3k5_Out1k5(TestNpuPerfMultiNodePdSepTestCaseBa
output_len = 1024
random_range_ratio = 1
tpot = 50
output_token_throughput = 16
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"""
@@ -48,7 +48,7 @@ OTHER_ARGS = [
"--nnodes",
2,
"--mem-fraction-static",
0.55,
0.662,
"--max-running-requests",
32,
"--chunked-prefill-size",
@@ -82,6 +82,10 @@ OTHER_ARGS = [
4,
"--speculative-draft-model-quantization",
"unquant",
"--reasoning-parser",
"kimi_k2",
"--tool-call-parser",
"kimi_k2",
]
MODEL_CONFIG = {
@@ -86,6 +86,10 @@ MINIMAX_M2_5_W8A8_4P_IN64K_OUT1K_PREFIX90_OTHER_ARGS = [
"--dtype",
"bfloat16",
"--trust-remote-code",
"--reasoning-parser",
"minimax-append-think",
"--tool-call-parser",
"minimax-m2",
]
@@ -106,7 +110,7 @@ class TestNPUMiniMaxM2_5W8A8_4P_In64k_Out1k_Prefix90_50ms(
random_range_ratio = 1
repeat_rate = 0.9
tpot = 50
output_token_throughput = 390.5839
output_token_throughput = 390.5859
request_rate = float("inf")
def test_npu_minimax_m2_5_w8a8_4p_in64k_out1k_prefix90_50ms(self):
@@ -122,7 +126,7 @@ class TestNPUMiniMaxM2_5_W8A8_4P_In3k5_Out1k5_GPQA(TestNpuAccuracyTestCaseBase):
datasets = ["gpqa_diamond"]
few_shot_num = 0
generation_config = {"max_tokens": 65536, "temperature": 1.0}
max_concurrency = 64
eval_batch_size = 64
def test_accuracy(self):
self.run_accuracy()
@@ -87,6 +87,10 @@ MINIMAX_M2_5_HIGH_THROUGHPUT_OTHER_ARGS = [
"unquant",
"--dtype",
"bfloat16",
"--reasoning-parser",
"minimax-append-think",
"--tool-call-parser",
"minimax-m2",
]
@@ -122,7 +126,7 @@ class TestNPUMiniMaxM2_5_W8A8_8P_In3k5_Out1k5_GPQA(TestNpuAccuracyTestCaseBase):
datasets = ["gpqa_diamond"]
few_shot_num = 0
generation_config = {"max_tokens": 65536, "temperature": 1.0}
max_concurrency = 64
eval_batch_size = 64
def test_accuracy(self):
self.run_accuracy()
@@ -82,6 +82,10 @@ QWEN3_8B_OTHER_ARGS = [
1,
"--speculative-num-draft-tokens",
4,
"--reasoning-parser",
"qwen3",
"--tool-call-parser",
"qwen",
]
@@ -69,6 +69,10 @@ QWEN3_8B_OTHER_ARGS = [
1,
"--speculative-num-draft-tokens",
5,
"--reasoning-parser",
"qwen3",
"--tool-call-parser",
"qwen",
]
@@ -84,7 +88,7 @@ class TestQwen8B(TestNpuPerformanceTestCaseBase):
output_len = 1500
random_range_ratio = 1
tpot = 11.79
output_token_throughput = 930
output_token_throughput = 1040.96
def test_qwen3_8b(self):
self.run_throughput()
@@ -87,6 +87,10 @@ QWEN3_30B_A3B_OTHER_ARGS = [
162,
"--dtype",
"bfloat16",
"--reasoning-parser",
"qwen3",
"--tool-call-parser",
"qwen",
]
@@ -65,12 +65,16 @@ QWEN3_32B_OTHER_ARGS = [
1,
"--dtype",
"bfloat16",
"--reasoning-parser",
"qwen3",
"--tool-call-parser",
"qwen",
]
class TestQwen32B(TestNpuPerformanceTestCaseBase):
benchmark_tool = BENCHMARK_TOOL_DEFAULT
aisbench_dataset_type = AISBENCHMARK_DATASET_DEFAULT
dataset_type = AISBENCHMARK_DATASET_DEFAULT
model = QWEN3_32B_MODEL_PATH
other_args = QWEN3_32B_OTHER_ARGS
envs = QWEN3_32B_ENVS
@@ -84,6 +84,10 @@ QWEN3_32B_OTHER_ARGS = [
101,
"--dtype",
"bfloat16",
"--reasoning-parser",
"qwen3",
"--tool-call-parser",
"qwen",
]
@@ -93,16 +97,12 @@ class TestQwen32B_GPQA(TestNpuAccuracyTestCaseBase):
model = QWEN3_32B_W8A8_MODEL_PATH
other_args = QWEN3_32B_OTHER_ARGS
envs = QWEN3_32B_ENVS
accuracy = 0.516
accuracy = 0.4949
datasets = ["gpqa_diamond"]
few_shot_num = 0
eval_batch_size = 64
generation_config = {"max_tokens": 40000, "temperature": 1.0}
@classmethod
def tearDownClass(cls):
pass
def test_qwen3_32b_qpqa(self):
"""Run NPU accuracy test for Qwen3-32B-W8A8 on qpqa"""
self.run_accuracy()
@@ -110,7 +110,7 @@ class TestQwen32B_GPQA(TestNpuAccuracyTestCaseBase):
class TestQwen32B(TestNpuPerformanceTestCaseBase):
base_url = DEFAULT_URL_FOR_TEST
aisbench_dataset_type = AISBENCHMARK_DATASET_DEFAULT
dataset_type = AISBENCHMARK_DATASET_DEFAULT
model = QWEN3_32B_W8A8_MODEL_PATH
other_args = QWEN3_32B_OTHER_ARGS
envs = QWEN3_32B_ENVS
@@ -123,10 +123,6 @@ class TestQwen32B(TestNpuPerformanceTestCaseBase):
tpot = 50
output_token_throughput = 1600
@classmethod
def setUpClass(cls):
pass
def test_qwen3_32b(self):
self.run_throughput()
@@ -84,6 +84,10 @@ QWEN3_32B_OTHER_ARGS = [
101,
"--dtype",
"bfloat16",
"--reasoning-parser",
"qwen3",
"--tool-call-parser",
"qwen",
]
@@ -80,6 +80,10 @@ QWEN3_6_27B_1024_OTHER_ARGS = [
"--speculative-num-draft-tokens",
4,
"--mm-enable-dp-encoder",
"--reasoning-parser",
"qwen3",
"--tool-call-parser",
"qwen3_coder",
]
@@ -87,11 +91,12 @@ class TestNPUQwen3_6_27B_1P_In1024x1024_30_Out1024_50ms(TestNpuPerformanceTestCa
"""Test NPU performance for Qwen3.6-27B 1p in1024x1024 30 out1024 50ms"""
benchmark_tool = BENCHMARK_TOOL_DEFAULT
aisbench_dataset_type = AISBENCHMARK_DATASET_MM_CUSTOM_GEN
dataset_type = AISBENCHMARK_DATASET_MM_CUSTOM_GEN
model = QWEN3_6_27B_MODEL_PATH
other_args = QWEN3_6_27B_1024_OTHER_ARGS
envs = QWEN3_6_27B_1024_ENVS
dataset_name = "random"
backend = "sglang-oai-chat"
dataset_name = "image"
max_concurrency = 48
num_prompts = 48
input_len = 30
@@ -77,6 +77,10 @@ QWEN3_6_27B_1080P_OTHER_ARGS = [
"--speculative-num-draft-tokens",
4,
"--mm-enable-dp-encoder",
"--reasoning-parser",
"qwen3",
"--tool-call-parser",
"qwen3_coder",
]
@@ -84,11 +88,12 @@ class TestNPUQwen3_6_27B_1P_In1080p_30_Out256_50ms(TestNpuPerformanceTestCaseBas
"""Test NPU performance for Qwen3.6-27B 1p in1080p 30 out256 50ms"""
benchmark_tool = BENCHMARK_TOOL_DEFAULT
aisbench_dataset_type = AISBENCHMARK_DATASET_MM_CUSTOM_GEN
dataset_type = AISBENCHMARK_DATASET_MM_CUSTOM_GEN
model = QWEN3_6_27B_MODEL_PATH
other_args = QWEN3_6_27B_1080P_OTHER_ARGS
envs = QWEN3_6_27B_1080P_ENVS
dataset_name = "random"
backend = "sglang-oai-chat"
dataset_name = "image"
max_concurrency = 30
num_prompts = 120
input_len = 30
@@ -46,24 +46,23 @@ QWEN3_6_27B_64K_PREFIX_OTHER_ARGS = [
"--max-running-requests",
20,
"--max-mamba-cache-size",
120,
160,
"--mem-fraction-static",
0.8,
0.82,
"--cuda-graph-bs",
1,
2,
4,
8,
5,
10,
12,
16,
18,
15,
17,
19,
20,
"--enable-prefill-delayer",
"--prefill-delayer-queue-min-ratio",
0.5,
0.7,
"--prefill-delayer-max-delay-ms",
30000,
20000,
"--dtype",
"bfloat16",
"--mamba-ssm-dtype",
@@ -76,11 +75,15 @@ QWEN3_6_27B_64K_PREFIX_OTHER_ARGS = [
1,
"--speculative-num-draft-tokens",
4,
"--reasoning-parser",
"qwen3",
"--tool-call-parser",
"qwen3_coder",
]
class TestNPUQwen3_6_27B_2P_In64k_Out1k_Prefix90_50ms(TestNpuPerformanceTestCaseBase):
"""Test NPU performance for Qwen3.6-27B-w8a8 2p in64k out1k prefix90 50ms"""
class TestNPUQwen3_6_27B_1P_In64k_Out1k_Prefix90_50ms(TestNpuPerformanceTestCaseBase):
"""Test NPU performance for Qwen3.6-27B 1p in64k out1k prefix90 50ms"""
benchmark_tool = BENCHMARK_TOOL_DEFAULT
model = QWEN3_6_27B_MODEL_PATH
@@ -94,11 +97,12 @@ class TestNPUQwen3_6_27B_2P_In64k_Out1k_Prefix90_50ms(TestNpuPerformanceTestCase
random_range_ratio = 1
repeat_rate = 0.9
request_rate = float("inf")
warmup_requests = 1
tpot = 50
output_token_throughput = 225
def test_npu_qwen3_6_27b_2p_in64k_out1k_prefix90_50ms(self):
"""Run NPU performance test for Qwen3.6-27B-w8a8 in64k out1k prefix90 50ms"""
"""Run NPU performance test for Qwen3.6-27B in64k out1k prefix90 50ms"""
self.run_throughput()
@@ -58,8 +58,10 @@ QWEN3_6_27B_3K5_1K5_OTHER_ARGS = [
8,
16,
32,
48,
64,
40,
45,
50,
54,
"--enable-multimodal",
"--quantization",
"modelslim",
@@ -77,6 +79,10 @@ QWEN3_6_27B_3K5_1K5_OTHER_ARGS = [
1,
"--speculative-num-draft-tokens",
4,
"--reasoning-parser",
"qwen3",
"--tool-call-parser",
"qwen3_coder",
]
@@ -106,11 +112,17 @@ 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.855
accuracy = 0.878
datasets = ["gpqa_diamond"]
few_shot_num = 0
eval_batch_size = 8
generation_config = {"max_tokens": 81920, "temperature": 1.0}
generation_config = {
"max_tokens": 81920,
"temperature": 1.0,
"extra_body": {
"chat_template_kwargs": {"enable_thinking": True},
},
}
def test_accuracy(self):
self.run_accuracy()
@@ -0,0 +1,99 @@
import unittest
from sglang.test.ascend.e2e.test_npu_performance_utils import (
AISBENCHMARK_DATASET_DEFAULT,
BENCHMARK_TOOL_DEFAULT,
QWEN3_6_27B_W8A8_MODEL_PATH,
TestNpuPerformanceTestCaseBase,
)
from sglang.test.ci.ci_register import register_npu_ci
register_npu_ci(
est_time=3600,
suite="",
nightly=True,
disabled="performance testcase",
)
QWEN3_6_27B_64K_1K_ENVS = {
"STREAMS_PER_DEVICE": "32",
"HCCL_SOCKET_IFNAME": "lo",
"GLOO_SOCKET_IFNAME": "lo",
"HCCL_OP_EXPANSION_MODE": "AIV",
"SGLANG_SET_CPU_AFFINITY": "1",
"SGLANG_ENABLE_SPEC_V2": "1",
"SGLANG_ENABLE_OVERLAP_PLAN_STREAM": "1",
}
QWEN3_6_27B_64K_1K_OTHER_ARGS = [
"--tp-size",
2,
"--nnodes",
1,
"--attention-backend",
"ascend",
"--device",
"npu",
"--chunked-prefill-size",
-1,
"--max-prefill-tokens",
48000,
"--disable-radix-cache",
"--trust-remote-code",
"--max-running-requests",
6,
"--max-mamba-cache-size",
16,
"--mem-fraction-static",
0.6,
"--cuda-graph-bs",
1,
2,
4,
5,
6,
"--quantization",
"modelslim",
"--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_2P_In64k_Out1k_50ms(TestNpuPerformanceTestCaseBase):
"""Test NPU performance for Qwen3.6-27B-w8a8 2p in64k out1k 50ms"""
benchmark_tool = BENCHMARK_TOOL_DEFAULT
dataset_type = AISBENCHMARK_DATASET_DEFAULT
model = QWEN3_6_27B_W8A8_MODEL_PATH
other_args = QWEN3_6_27B_64K_1K_OTHER_ARGS
envs = QWEN3_6_27B_64K_1K_ENVS
dataset_name = "random"
max_concurrency = 6
num_prompts = 12
input_len = 64000
output_len = 1000
random_range_ratio = 1
tpot = 50
output_token_throughput = 57.85
def test_npu_qwen3_6_27b_2p_in64k_out1k_50ms(self):
"""Run NPU performance test for Qwen3.6-27B-w8a8 in64k out1k 50ms"""
self.run_throughput()
if __name__ == "__main__":
unittest.main()
@@ -65,6 +65,10 @@ QWEN3_6_27B_128K_OTHER_ARGS = [
"bfloat16",
"--mamba-ssm-dtype",
"bfloat16",
"--reasoning-parser",
"qwen3",
"--tool-call-parser",
"qwen3_coder",
]
@@ -72,7 +76,7 @@ class TestNPUQwen3_6_27B_2P_In128k_Out1k_50ms(TestNpuPerformanceTestCaseBase):
"""Test NPU performance for Qwen3.6-27B-w8a8 2p in128k out1k 50ms"""
benchmark_tool = BENCHMARK_TOOL_DEFAULT
aisbench_dataset_type = AISBENCHMARK_DATASET_DEFAULT
dataset_type = AISBENCHMARK_DATASET_DEFAULT
model = QWEN3_6_27B_W8A8_MODEL_PATH
other_args = QWEN3_6_27B_128K_OTHER_ARGS
envs = QWEN3_6_27B_128K_ENVS
@@ -16,7 +16,6 @@ register_npu_ci(
)
QWEN3_6_27B_16K_1k_ENVS = {
"PYTORCH_NPU_ALLOC_CONF": "expandable_segments:True",
"STREAMS_PER_DEVICE": "32",
"HCCL_SOCKET_IFNAME": "lo",
"GLOO_SOCKET_IFNAME": "lo",
@@ -25,7 +24,8 @@ QWEN3_6_27B_16K_1k_ENVS = {
"SGLANG_ENABLE_SPEC_V2": "1",
"SGLANG_ENABLE_OVERLAP_PLAN_STREAM": "1",
"SGLANG_SCHEDULER_DECREASE_PREFILL_IDLE": "1",
"SGLANG_PREFILL_DELAYER_MAX_DELAY_PASSES": "30",
"SGLANG_PREFILL_DELAYER_MAX_DELAY_PASSES": "100",
"GDN_ATTN_BACKEND_TRITON": "1",
"ASCEND_USE_FIA": "1",
}
@@ -41,28 +41,28 @@ QWEN3_6_27B_16K_1k_OTHER_ARGS = [
"--chunked-prefill-size",
-1,
"--max-prefill-tokens",
50000,
58000,
"--disable-radix-cache",
"--trust-remote-code",
"--max-running-requests",
28,
29,
"--max-mamba-cache-size",
50,
58,
"--mem-fraction-static",
0.7,
0.68,
"--cuda-graph-bs",
1,
2,
8,
12,
16,
20,
24,
26,
28,
"--enable-multimodal",
29,
"--quantization",
"modelslim",
"--mm-attention-backend",
"ascend_attn",
"--dtype",
"bfloat16",
"--mamba-ssm-dtype",
@@ -75,6 +75,10 @@ QWEN3_6_27B_16K_1k_OTHER_ARGS = [
1,
"--speculative-num-draft-tokens",
4,
"--reasoning-parser",
"qwen3",
"--tool-call-parser",
"qwen3_coder",
]
@@ -82,13 +86,13 @@ class TestNPUQwen3_6_27B_2P_In16k_Out1k_50ms(TestNpuPerformanceTestCaseBase):
"""Test NPU performance for Qwen3.6-27B-w8a8 2p in16k out1k 50ms"""
benchmark_tool = BENCHMARK_TOOL_DEFAULT
aisbench_dataset_type = AISBENCHMARK_DATASET_DEFAULT
dataset_type = AISBENCHMARK_DATASET_DEFAULT
model = QWEN3_6_27B_W8A8_MODEL_PATH
other_args = QWEN3_6_27B_16K_1k_OTHER_ARGS
envs = QWEN3_6_27B_16K_1k_ENVS
dataset_name = "random"
max_concurrency = 28
num_prompts = 112
max_concurrency = 29
num_prompts = 116
input_len = 16000
output_len = 1000
random_range_ratio = 1
@@ -18,6 +18,7 @@ register_npu_ci(
QWEN3_6_35B_A3B_128K_1K_ENVS = {
"PYTORCH_NPU_ALLOC_CONF": "expandable_segments:True",
"STREAMS_PER_DEVICE": "32",
"HCCL_BUFFSIZE": "1600",
"HCCL_SOCKET_IFNAME": "lo",
"GLOO_SOCKET_IFNAME": "lo",
"HCCL_OP_EXPANSION_MODE": "AIV",
@@ -26,6 +27,7 @@ QWEN3_6_35B_A3B_128K_1K_ENVS = {
"SGLANG_ENABLE_OVERLAP_PLAN_STREAM": "1",
"ASCEND_USE_FIA": "1",
"SGLANG_PREFILL_DELAYER_MAX_DELAY_PASSES": "20",
"GDN_ATTN_BACKEND_TRITON": "1",
}
QWEN3_6_35B_A3B_128K_1K_OTHER_ARGS = [
@@ -40,21 +42,21 @@ QWEN3_6_35B_A3B_128K_1K_OTHER_ARGS = [
"--chunked-prefill-size",
-1,
"--max-total-tokens",
600000,
420000,
"--max-prefill-tokens",
65536,
128000,
"--disable-radix-cache",
"--trust-remote-code",
"--enable-prefill-delayer",
"--max-running-requests",
4,
3,
"--max-mamba-cache-size",
12,
3,
"--mem-fraction-static",
0.6,
"--max-mamba-cache-size",
20,
"--disable-cuda-graph",
0.9,
"--cuda-graph-bs",
1,
2,
3,
"--enable-multimodal",
"--mm-attention-backend",
"ascend_attn",
@@ -70,6 +72,10 @@ QWEN3_6_35B_A3B_128K_1K_OTHER_ARGS = [
1,
"--speculative-num-draft-tokens",
4,
"--reasoning-parser",
"qwen3",
"--tool-call-parser",
"qwen3_coder",
]
@@ -82,11 +88,12 @@ class TestNPUQwen3_6_35BA3B_1P_In128k_Out1k_50ms(TestNpuPerformanceTestCaseBase)
other_args = QWEN3_6_35B_A3B_128K_1K_OTHER_ARGS
envs = QWEN3_6_35B_A3B_128K_1K_ENVS
dataset_name = "random"
max_concurrency = 4
num_prompts = 16
max_concurrency = 3
num_prompts = 3
input_len = 128000
output_len = 1000
random_range_ratio = 1
seed = 1
tpot = 50
output_token_throughput = 60.57
@@ -76,6 +76,10 @@ QWEN3_6_35B_A3B_128K_PREFIX_OTHER_ARGS = [
1,
"--speculative-num-draft-tokens",
4,
"--reasoning-parser",
"qwen3",
"--tool-call-parser",
"qwen3_coder",
]
@@ -91,10 +95,11 @@ class TestNPUQwen3_6_35BA3B_1P_In128k_Out1k_Prefix90_50ms(
dataset_name = "generated-shared-prefix"
max_concurrency = 103
num_prompts = 412
input_len = 64000
input_len = 128000
output_len = 1000
random_range_ratio = 1
repeat_rate = 0.9
seed = 1
tpot = 50
request_rate = float("inf")
output_token_throughput = 308.2
@@ -18,7 +18,7 @@ register_npu_ci(
QWEN3_6_35B_A3B_3K5_1K5_ENVS = {
"PYTORCH_NPU_ALLOC_CONF": "expandable_segments:True",
"STREAMS_PER_DEVICE": "32",
"HCCL_BUFFSIZE": "800",
"HCCL_BUFFSIZE": "1",
"HCCL_SOCKET_IFNAME": "lo",
"GLOO_SOCKET_IFNAME": "lo",
"HCCL_OP_EXPANSION_MODE": "AIV",
@@ -26,7 +26,6 @@ QWEN3_6_35B_A3B_3K5_1K5_ENVS = {
"SGLANG_ENABLE_SPEC_V2": "1",
"SGLANG_ENABLE_OVERLAP_PLAN_STREAM": "0",
"ASCEND_USE_FIA": "1",
"SGLANG_PREFILL_DELAYER_MAX_DELAY_PASSES": "50",
}
QWEN3_6_35B_A3B_3K5_1K5_OTHER_ARGS = [
@@ -40,25 +39,29 @@ QWEN3_6_35B_A3B_3K5_1K5_OTHER_ARGS = [
"npu",
"--chunked-prefill-size",
-1,
"--max-total-tokens",
659840,
"--max-prefill-tokens",
35000,
43400,
"--disable-radix-cache",
"--trust-remote-code",
"--enable-prefill-delayer",
"--prefill-max-requests",
"12",
"--max-running-requests",
110,
122,
"--max-mamba-cache-size",
115,
122,
"--mem-fraction-static",
0.78,
0.9,
"--cuda-graph-bs",
4,
16,
32,
64,
84,
105,
110,
96,
116,
120,
122,
"--enable-multimodal",
"--mm-attention-backend",
"ascend_attn",
@@ -74,6 +77,10 @@ QWEN3_6_35B_A3B_3K5_1K5_OTHER_ARGS = [
1,
"--speculative-num-draft-tokens",
4,
"--reasoning-parser",
"qwen3",
"--tool-call-parser",
"qwen3_coder",
]
@@ -86,11 +93,12 @@ class TestNPUQwen3_6_35BA3B_1P_In3k5_Out1k5_50ms(TestNpuPerformanceTestCaseBase)
other_args = QWEN3_6_35B_A3B_3K5_1K5_OTHER_ARGS
envs = QWEN3_6_35B_A3B_3K5_1K5_ENVS
dataset_name = "random"
max_concurrency = 110
num_prompts = 440
max_concurrency = 122
num_prompts = 122
input_len = 3500
output_len = 1500
random_range_ratio = 1
seed = 1
tpot = 50
output_token_throughput = 2031.71
@@ -74,6 +74,10 @@ QWEN3_6_35B_A3B_64K_1K_OTHER_ARGS = [
1,
"--speculative-num-draft-tokens",
4,
"--reasoning-parser",
"qwen3",
"--tool-call-parser",
"qwen3_coder",
]
@@ -91,6 +95,7 @@ class TestNPUQwen3_6_35BA3B_1P_In64k_Out1k_50ms(TestNpuPerformanceTestCaseBase):
input_len = 64000
output_len = 1000
random_range_ratio = 1
seed = 1
tpot = 50
output_token_throughput = 141.72
@@ -43,18 +43,19 @@ QWEN3_6_35B_A3B_64K_PREFIX_OTHER_ARGS = [
"npu",
"--chunked-prefill-size",
-1,
"--max-total-tokens",
470784,
"--max-prefill-tokens",
65536,
"--trust-remote-code",
"--enable-prefill-delayer",
"--mamba-scheduler-strategy",
"extra_buffer",
"--max-running-requests",
42,
40,
"--max-mamba-cache-size",
210,
200,
"--mem-fraction-static",
0.71,
0.9,
"--cuda-graph-bs",
2,
8,
@@ -63,7 +64,6 @@ QWEN3_6_35B_A3B_64K_PREFIX_OTHER_ARGS = [
32,
36,
40,
42,
"--enable-multimodal",
"--mm-attention-backend",
"ascend_attn",
@@ -79,6 +79,10 @@ QWEN3_6_35B_A3B_64K_PREFIX_OTHER_ARGS = [
1,
"--speculative-num-draft-tokens",
4,
"--reasoning-parser",
"qwen3",
"--tool-call-parser",
"qwen3_coder",
]
@@ -118,15 +122,17 @@ class TestNPUQwen3_6_35BA3B_1P_In64k_Out1k_Prefix90_50ms(
other_args = QWEN3_6_35B_A3B_64K_PREFIX_OTHER_ARGS
envs = QWEN3_6_35B_A3B_64K_PREFIX_ENVS
dataset_name = "generated-shared-prefix"
max_concurrency = 42
num_prompts = 42
max_concurrency = 40
num_prompts = 40
input_len = 65536
output_len = 1024
random_range_ratio = 1
repeat_rate = 0.9
seed = 1
tpot = 50
request_rate = float("inf")
output_token_throughput = 660
pop_sglang_is_in_ci_for_gsp = True
@classmethod
def setUpClass(cls):
@@ -91,6 +91,10 @@ QWEN3_NEXT_80B_A3B_OTHER_ARGS = [
"bfloat16",
"--speculative-draft-model-path",
QWEN3_NEXT_80B_A3B_MODEL_PATH,
"--reasoning-parser",
"qwen3",
"--tool-call-parser",
"qwen3_coder",
]
@@ -123,12 +127,12 @@ class TestQwen3Next80BA3B_aime25(TestNpuAccuracyTestCaseBase):
"temperature": 0.7,
"top_p": 0.8,
"top_k": 20,
"extra_body": {"chat_template_kwargs": {"enable_thinking": True}},
"extra_body": {"chat_template_kwargs": {"enable_thinking": False}},
}
max_concurrency = 16
def test_aime25(self):
self.run_accuracy()
self.run_accuracy_multiple(n_runs=3)
if __name__ == "__main__":