Update test repository case scripts to the main community (#29939)
This commit is contained in:
@@ -36,8 +36,8 @@ class TestNPUDeepSeek_V3_2_8P_AIME2025(TestNpuAccuracyTestCaseBase):
|
||||
|
||||
model = DEEPSEEK_V3_2_EXP_W8A8_WEIGHTS_PATH
|
||||
other_args = OTHER_ARGS
|
||||
accuracy = 0.931
|
||||
datasets = ["aime25"]
|
||||
accuracy = 0.936
|
||||
datasets = ["gsm8k"]
|
||||
few_shot_num = 0
|
||||
generation_config = {"max_tokens": 65536, "temperature": 1.0}
|
||||
eval_batch_size = 64
|
||||
|
||||
@@ -37,10 +37,10 @@ OTHER_ARGS = [
|
||||
"--dtype",
|
||||
"bfloat16",
|
||||
"--max-running-requests",
|
||||
32,
|
||||
8,
|
||||
"--trust-remote-code",
|
||||
"--mem-fraction-static",
|
||||
0.75,
|
||||
0.5,
|
||||
"--cuda-graph-bs",
|
||||
1,
|
||||
2,
|
||||
@@ -65,7 +65,7 @@ class TestQwen3(TestNpuAccuracyTestCaseBase):
|
||||
datasets = ["mmmu"]
|
||||
few_shot_num = 0
|
||||
generation_config = {"max_tokens": 65536, "temperature": 1.0}
|
||||
eval_batch_size = 64
|
||||
eval_batch_size = 16
|
||||
|
||||
def test_mmmu(self):
|
||||
self.run_accuracy()
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ class TestQwen3(TestNpuAccuracyTestCaseBase):
|
||||
model = QWEN3_VL_30B_A3B_THINKING_MODEL_PATH
|
||||
envs = ENVS
|
||||
other_args = OTHER_ARGS
|
||||
accuracy = 0.76
|
||||
accuracy = 0.7167
|
||||
datasets = ["mmmu"]
|
||||
few_shot_num = 0
|
||||
generation_config = {"max_tokens": 65536}
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ class TestQwen3(TestNpuAccuracyTestCaseBase):
|
||||
model = QWEN3_VL_8B_THINKING_MODEL_PATH
|
||||
envs = ENVS
|
||||
other_args = OTHER_ARGS
|
||||
accuracy = 0.741
|
||||
accuracy = 0.7011
|
||||
datasets = ["mmmu"]
|
||||
few_shot_num = 0
|
||||
generation_config = {"max_tokens": 65536}
|
||||
|
||||
@@ -4,17 +4,14 @@ python3 -m unittest test_ascend_w4a4_quantization.TestAscendW4A4.test_gsm8k
|
||||
"""
|
||||
|
||||
import os
|
||||
import time
|
||||
import unittest
|
||||
|
||||
import requests
|
||||
|
||||
from sglang.test.ascend.gsm8k_ascend_mixin import GSM8KAscendMixin
|
||||
from sglang.test.ascend.test_ascend_utils import (
|
||||
ECO_TECH_QWEN3_32B_W4A4_LAOS_WEIGHTS_PATH,
|
||||
)
|
||||
from sglang.test.ci.ci_register import register_npu_ci
|
||||
from sglang.test.test_utils import CustomTestCase, is_in_ci, write_github_step_summary
|
||||
from sglang.test.test_utils import CustomTestCase
|
||||
|
||||
register_npu_ci(est_time=400, suite="stage-b-test-4-npu-a3", nightly=False)
|
||||
register_npu_ci(est_time=400, suite="nightly-4-npu-a3", nightly=True)
|
||||
@@ -46,37 +43,8 @@ class TestAscendW4A4(GSM8KAscendMixin, CustomTestCase):
|
||||
accuracy = 0.80 # GSM8K accuracy ≥0.80
|
||||
num_questions = 1319
|
||||
gsm8k_num_shots = 5
|
||||
output_throughput = 1000 # GSM8K output throughput ≥1000 tokens/s
|
||||
gsm8k_parallel = 64
|
||||
|
||||
def run_decode(self, max_new_tokens):
|
||||
response = requests.post(
|
||||
self.base_url + "/generate",
|
||||
json={
|
||||
"text": "The capital of France is",
|
||||
"sampling_params": {
|
||||
"temperature": 0,
|
||||
"max_new_tokens": max_new_tokens,
|
||||
},
|
||||
"ignore_eos": True,
|
||||
},
|
||||
)
|
||||
return response.json()
|
||||
|
||||
def test_throughput(self):
|
||||
max_tokens = 256
|
||||
|
||||
tic = time.perf_counter()
|
||||
res = self.run_decode(max_tokens)
|
||||
tok = time.perf_counter()
|
||||
throughput = max_tokens / (tok - tic)
|
||||
summary = res["text"] + f"\nThroughput: {throughput} tokens/s"
|
||||
print(summary)
|
||||
|
||||
if is_in_ci():
|
||||
write_github_step_summary(summary + "\nThroughput threshold: 35 tokens/s")
|
||||
self.assertGreaterEqual(throughput, 35)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
+1
@@ -194,6 +194,7 @@ class TestNPUGLM5_1_W4A8_PD_SEP_In3k5_Out1k5(TestNpuPerfMultiNodePdSepTestCaseBa
|
||||
input_len = 65536
|
||||
output_len = 1024
|
||||
random_range_ratio = 1
|
||||
seed = 1
|
||||
tpot = 50
|
||||
output_token_throughput = 160
|
||||
|
||||
|
||||
+1
@@ -118,6 +118,7 @@ class TestNPUKimiK2_6_W4A8_16P_In64k_Out1k_100ms(TestNpuPerfMultiNodePdMixTestCa
|
||||
input_len = 64000
|
||||
output_len = 1000
|
||||
random_range_ratio = 1
|
||||
seed = 1
|
||||
tpot = 100
|
||||
output_token_throughput = 160
|
||||
|
||||
|
||||
+1
@@ -108,6 +108,7 @@ class TestNPUMiniMaxM2_5W8A8_4P_In64k_Out1k_Prefix90_50ms(
|
||||
input_len = 65536
|
||||
output_len = 1024
|
||||
random_range_ratio = 1
|
||||
seed = 1
|
||||
repeat_rate = 0.9
|
||||
tpot = 50
|
||||
output_token_throughput = 390.5859
|
||||
|
||||
+2
-1
@@ -56,7 +56,7 @@ MINIMAX_M2_5_HIGH_THROUGHPUT_OTHER_ARGS = [
|
||||
500,
|
||||
"--enable-prefill-delayer",
|
||||
"--chunked-prefill-size",
|
||||
-1,
|
||||
196608,
|
||||
"--max-prefill-token",
|
||||
8192,
|
||||
"--cuda-graph-bs",
|
||||
@@ -110,6 +110,7 @@ class TestNPUMiniMaxM2_5_W8A8_8P_In3k5_Out1k5_HighThroughput(
|
||||
input_len = 3500
|
||||
output_len = 1500
|
||||
random_range_ratio = 1
|
||||
seed = 1
|
||||
tpot = 50
|
||||
output_token_throughput = 5717.58
|
||||
|
||||
|
||||
+1
@@ -101,6 +101,7 @@ class TestQwen8B(TestNpuPerformanceTestCaseBase):
|
||||
input_len = 3500
|
||||
output_len = 1500
|
||||
random_range_ratio = 1
|
||||
seed = 1
|
||||
tpot = 37
|
||||
output_token_throughput = 1586
|
||||
|
||||
|
||||
+1
@@ -106,6 +106,7 @@ class TestQwen30B(TestNpuPerformanceTestCaseBase):
|
||||
input_len = 3500
|
||||
output_len = 1500
|
||||
random_range_ratio = 1
|
||||
seed = 1
|
||||
tpot = 50
|
||||
output_token_throughput = 3200
|
||||
|
||||
|
||||
+1
@@ -84,6 +84,7 @@ class TestQwen32B(TestNpuPerformanceTestCaseBase):
|
||||
input_len = 18000
|
||||
output_len = 4000
|
||||
random_range_ratio = 1
|
||||
seed = 1
|
||||
tpot = 6
|
||||
output_token_throughput = 171
|
||||
|
||||
|
||||
+3
-2
@@ -120,8 +120,9 @@ class TestQwen32B(TestNpuPerformanceTestCaseBase):
|
||||
input_len = 3584
|
||||
output_len = 1536
|
||||
random_range_ratio = 1
|
||||
tpot = 50
|
||||
output_token_throughput = 1600
|
||||
seed = 1
|
||||
tpot = 55
|
||||
output_token_throughput = 1500
|
||||
|
||||
def test_qwen3_32b(self):
|
||||
self.run_throughput()
|
||||
|
||||
+1
@@ -103,6 +103,7 @@ class TestQwen32B(TestNpuPerformanceTestCaseBase):
|
||||
input_len = 3584
|
||||
output_len = 1536
|
||||
random_range_ratio = 1
|
||||
seed = 1
|
||||
tpot = 50
|
||||
output_token_throughput = 1600
|
||||
|
||||
|
||||
+6
-4
@@ -48,11 +48,11 @@ QWEN3_6_27B_1024_OTHER_ARGS = [
|
||||
"--disable-radix-cache",
|
||||
"--trust-remote-code",
|
||||
"--max-running-requests",
|
||||
50,
|
||||
60,
|
||||
"--max-mamba-cache-size",
|
||||
60,
|
||||
"--mem-fraction-static",
|
||||
0.76,
|
||||
0.74,
|
||||
"--cuda-graph-bs",
|
||||
2,
|
||||
4,
|
||||
@@ -64,6 +64,7 @@ QWEN3_6_27B_1024_OTHER_ARGS = [
|
||||
42,
|
||||
45,
|
||||
50,
|
||||
60,
|
||||
"--enable-multimodal",
|
||||
"--mm-attention-backend",
|
||||
"ascend_attn",
|
||||
@@ -97,13 +98,14 @@ class TestNPUQwen3_6_27B_1P_In1024x1024_30_Out1024_50ms(TestNpuPerformanceTestCa
|
||||
envs = QWEN3_6_27B_1024_ENVS
|
||||
backend = "sglang-oai-chat"
|
||||
dataset_name = "image"
|
||||
max_concurrency = 48
|
||||
num_prompts = 48
|
||||
max_concurrency = 60
|
||||
num_prompts = 240
|
||||
input_len = 30
|
||||
output_len = 1024
|
||||
random_range_ratio = 1
|
||||
image_resolution = "1024x1024"
|
||||
image_count = 1
|
||||
seed = 1
|
||||
tpot = 50
|
||||
output_token_throughput = 800.8
|
||||
|
||||
|
||||
+21
-11
@@ -16,7 +16,6 @@ register_npu_ci(
|
||||
)
|
||||
|
||||
QWEN3_6_27B_1080P_ENVS = {
|
||||
"PYTORCH_NPU_ALLOC_CONF": "expandable_segments:True",
|
||||
"STREAMS_PER_DEVICE": "32",
|
||||
"HCCL_SOCKET_IFNAME": "lo",
|
||||
"GLOO_SOCKET_IFNAME": "lo",
|
||||
@@ -24,11 +23,9 @@ QWEN3_6_27B_1080P_ENVS = {
|
||||
"SGLANG_SET_CPU_AFFINITY": "1",
|
||||
"SGLANG_VIT_ENABLE_CUDA_GRAPH": "1",
|
||||
"SGLANG_ENABLE_SPEC_V2": "1",
|
||||
"SGLANG_NPU_PROFILING": "1",
|
||||
"SGLANG_NPU_PROFILING": "0",
|
||||
"SGLANG_NPU_PROFILING_STAGE": "prefill",
|
||||
"SGLANG_ENABLE_OVERLAP_PLAN_STREAM": "1",
|
||||
"SGLANG_SCHEDULER_DECREASE_PREFILL_IDLE": "1",
|
||||
"SGLANG_PREFILL_DELAYER_MAX_DELAY_PASSES": "150",
|
||||
"ASCEND_USE_FIA": "1",
|
||||
}
|
||||
|
||||
@@ -44,23 +41,35 @@ QWEN3_6_27B_1080P_OTHER_ARGS = [
|
||||
"--chunked-prefill-size",
|
||||
-1,
|
||||
"--max-prefill-tokens",
|
||||
48000,
|
||||
82688,
|
||||
"--disable-radix-cache",
|
||||
"--trust-remote-code",
|
||||
"--max-running-requests",
|
||||
30,
|
||||
38,
|
||||
"--max-mamba-cache-size",
|
||||
40,
|
||||
38,
|
||||
"--mem-fraction-static",
|
||||
0.76,
|
||||
0.70,
|
||||
"--cuda-graph-bs",
|
||||
1,
|
||||
2,
|
||||
4,
|
||||
8,
|
||||
10,
|
||||
12,
|
||||
16,
|
||||
20,
|
||||
24,
|
||||
28,
|
||||
30,
|
||||
32,
|
||||
35,
|
||||
38,
|
||||
"--enable-prefill-delayer",
|
||||
"--prefill-delayer-queue-min-ratio",
|
||||
0.45,
|
||||
"--prefill-delayer-max-delay-ms",
|
||||
5500,
|
||||
"--enable-multimodal",
|
||||
"--mm-attention-backend",
|
||||
"ascend_attn",
|
||||
@@ -76,7 +85,6 @@ QWEN3_6_27B_1080P_OTHER_ARGS = [
|
||||
1,
|
||||
"--speculative-num-draft-tokens",
|
||||
4,
|
||||
"--mm-enable-dp-encoder",
|
||||
"--reasoning-parser",
|
||||
"qwen3",
|
||||
"--tool-call-parser",
|
||||
@@ -94,13 +102,15 @@ class TestNPUQwen3_6_27B_1P_In1080p_30_Out256_50ms(TestNpuPerformanceTestCaseBas
|
||||
envs = QWEN3_6_27B_1080P_ENVS
|
||||
backend = "sglang-oai-chat"
|
||||
dataset_name = "image"
|
||||
max_concurrency = 30
|
||||
num_prompts = 120
|
||||
warmup_requests = 38
|
||||
max_concurrency = 42
|
||||
num_prompts = 152
|
||||
input_len = 30
|
||||
output_len = 256
|
||||
random_range_ratio = 1
|
||||
image_resolution = "1920x1080"
|
||||
image_count = 1
|
||||
seed = 1
|
||||
tpot = 50
|
||||
output_token_throughput = 226
|
||||
|
||||
|
||||
+8
-6
@@ -58,11 +58,11 @@ QWEN3_6_27B_64K_PREFIX_OTHER_ARGS = [
|
||||
17,
|
||||
19,
|
||||
20,
|
||||
"--enable-prefill-delayer",
|
||||
"--prefill-delayer-queue-min-ratio",
|
||||
0.7,
|
||||
"--prefill-delayer-max-delay-ms",
|
||||
20000,
|
||||
# "--enable-prefill-delayer",
|
||||
# "--prefill-delayer-queue-min-ratio",
|
||||
# 0.7,
|
||||
# "--prefill-delayer-max-delay-ms",
|
||||
# 20000,
|
||||
"--dtype",
|
||||
"bfloat16",
|
||||
"--mamba-ssm-dtype",
|
||||
@@ -91,15 +91,17 @@ class TestNPUQwen3_6_27B_1P_In64k_Out1k_Prefix90_50ms(TestNpuPerformanceTestCase
|
||||
envs = QWEN3_6_27B_64K_PREFIX_ENVS
|
||||
dataset_name = "generated-shared-prefix"
|
||||
max_concurrency = 20
|
||||
num_prompts = 80
|
||||
num_prompts = 20
|
||||
input_len = 64000
|
||||
output_len = 1000
|
||||
random_range_ratio = 1
|
||||
seed = 1
|
||||
repeat_rate = 0.9
|
||||
request_rate = float("inf")
|
||||
warmup_requests = 1
|
||||
tpot = 50
|
||||
output_token_throughput = 225
|
||||
pop_sglang_is_in_ci_for_gsp = True
|
||||
|
||||
def test_npu_qwen3_6_27b_2p_in64k_out1k_prefix90_50ms(self):
|
||||
"""Run NPU performance test for Qwen3.6-27B in64k out1k prefix90 50ms"""
|
||||
|
||||
+1
@@ -100,6 +100,7 @@ class TestNPUQwen3_6_27B_1P_In3k5_Out1k5_50ms(TestNpuPerformanceTestCaseBase):
|
||||
input_len = 3500
|
||||
output_len = 1500
|
||||
random_range_ratio = 1
|
||||
seed = 1
|
||||
tpot = 50
|
||||
output_token_throughput = 786.69
|
||||
|
||||
|
||||
+1
@@ -86,6 +86,7 @@ class TestNPUQwen3_6_27B_2P_In128k_Out1k_50ms(TestNpuPerformanceTestCaseBase):
|
||||
input_len = 128000
|
||||
output_len = 1000
|
||||
random_range_ratio = 1
|
||||
seed = 1
|
||||
tpot = 50
|
||||
output_token_throughput = 41.39
|
||||
|
||||
|
||||
+1
@@ -96,6 +96,7 @@ class TestNPUQwen3_6_27B_2P_In16k_Out1k_50ms(TestNpuPerformanceTestCaseBase):
|
||||
input_len = 16000
|
||||
output_len = 1000
|
||||
random_range_ratio = 1
|
||||
seed = 1
|
||||
tpot = 50
|
||||
output_token_throughput = 426.1
|
||||
|
||||
|
||||
+1
@@ -88,6 +88,7 @@ class TestNPUQwen3_6_27B_2P_In64k_Out1k_50ms(TestNpuPerformanceTestCaseBase):
|
||||
input_len = 64000
|
||||
output_len = 1000
|
||||
random_range_ratio = 1
|
||||
seed = 1
|
||||
tpot = 50
|
||||
output_token_throughput = 122.6
|
||||
|
||||
|
||||
+1
@@ -103,6 +103,7 @@ class TestNPUQwen3_6_35BA3B_1P_In128k_Out1k_Prefix90_50ms(
|
||||
tpot = 50
|
||||
request_rate = float("inf")
|
||||
output_token_throughput = 308.2
|
||||
pop_sglang_is_in_ci_for_gsp = True
|
||||
|
||||
def test_npu_qwen3_6_35b_a3b_1p_in128k_out1k_prefix90_50ms(self):
|
||||
"""Run NPU performance test for Qwen3.6-35B-A3B in128k out1k prefix90 50ms"""
|
||||
|
||||
Reference in New Issue
Block a user