migrate NPU PR/nightly test cases to a3-560T (#33346)
Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: sglang-npu-bot <sglangnpu@163.com>
This commit is contained in:
co-authored by
Claude
sglang-npu-bot
parent
95d0e57e83
commit
e76d0acdc9
@@ -3,6 +3,7 @@ from types import SimpleNamespace
|
||||
from urllib.parse import urlparse
|
||||
|
||||
from sglang.srt.utils import kill_process_tree
|
||||
from sglang.test.ascend.npu_eval_accuracy_kit import _is_pr_pipeline, run_npu_pr_smoke
|
||||
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 (
|
||||
@@ -12,7 +13,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="stage-b-test-1-npu-a3", nightly=False)
|
||||
register_npu_ci(est_time=400, suite="nightly-1-npu-a3", nightly=True)
|
||||
|
||||
TEST_MODEL_MATRIX = {
|
||||
@@ -45,33 +46,31 @@ class TestAscendMhaHicache(CustomTestCase):
|
||||
def test_a_gsm8k(self):
|
||||
for model in self.models:
|
||||
with self.subTest(model=model):
|
||||
print(f"##=== Testing accuracy: {model} ===##")
|
||||
|
||||
process = popen_launch_server(
|
||||
model,
|
||||
self.base_url,
|
||||
timeout=DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
|
||||
other_args=[
|
||||
*self.common_args,
|
||||
],
|
||||
other_args=[*self.common_args],
|
||||
)
|
||||
|
||||
try:
|
||||
args = SimpleNamespace(
|
||||
num_shots=5,
|
||||
data_path=None,
|
||||
num_questions=1319,
|
||||
max_new_tokens=512,
|
||||
parallel=128,
|
||||
host=f"http://{self.url.hostname}",
|
||||
port=int(self.url.port),
|
||||
)
|
||||
|
||||
metrics = run_eval_few_shot_gsm8k(args)
|
||||
self.assertGreaterEqual(
|
||||
metrics["accuracy"],
|
||||
TEST_MODEL_MATRIX[model]["accuracy"],
|
||||
)
|
||||
if _is_pr_pipeline:
|
||||
run_npu_pr_smoke(self.base_url)
|
||||
else:
|
||||
print(f"##=== Testing accuracy: {model} ===##")
|
||||
args = SimpleNamespace(
|
||||
num_shots=5,
|
||||
data_path=None,
|
||||
num_questions=1319,
|
||||
max_new_tokens=512,
|
||||
parallel=128,
|
||||
host=f"http://{self.url.hostname}",
|
||||
port=int(self.url.port),
|
||||
)
|
||||
metrics = run_eval_few_shot_gsm8k(args)
|
||||
self.assertGreaterEqual(
|
||||
metrics["accuracy"],
|
||||
TEST_MODEL_MATRIX[model]["accuracy"],
|
||||
)
|
||||
finally:
|
||||
kill_process_tree(process.pid)
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ from types import SimpleNamespace
|
||||
from urllib.parse import urlparse
|
||||
|
||||
from sglang.srt.utils import kill_process_tree
|
||||
from sglang.test.ascend.npu_eval_accuracy_kit import _is_pr_pipeline, run_npu_pr_smoke
|
||||
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 (
|
||||
@@ -47,8 +48,6 @@ class TestAscendMlaHicache(CustomTestCase):
|
||||
def test_a_gsm8k(self):
|
||||
for model in self.models:
|
||||
with self.subTest(model=model):
|
||||
print(f"##=== Testing accuracy: {model} ===##")
|
||||
|
||||
process = popen_launch_server(
|
||||
model,
|
||||
self.base_url,
|
||||
@@ -59,21 +58,26 @@ class TestAscendMlaHicache(CustomTestCase):
|
||||
)
|
||||
|
||||
try:
|
||||
args = SimpleNamespace(
|
||||
num_shots=5,
|
||||
data_path=None,
|
||||
num_questions=1319,
|
||||
max_new_tokens=512,
|
||||
parallel=128,
|
||||
host=f"http://{self.url.hostname}",
|
||||
port=int(self.url.port),
|
||||
)
|
||||
if _is_pr_pipeline:
|
||||
run_npu_pr_smoke(self.base_url)
|
||||
else:
|
||||
print(f"##=== Testing accuracy: {model} ===##")
|
||||
|
||||
metrics = run_eval_few_shot_gsm8k(args)
|
||||
self.assertGreaterEqual(
|
||||
metrics["accuracy"],
|
||||
TEST_MODEL_MATRIX[model]["accuracy"],
|
||||
)
|
||||
args = SimpleNamespace(
|
||||
num_shots=5,
|
||||
data_path=None,
|
||||
num_questions=1319,
|
||||
max_new_tokens=512,
|
||||
parallel=128,
|
||||
host=f"http://{self.url.hostname}",
|
||||
port=int(self.url.port),
|
||||
)
|
||||
|
||||
metrics = run_eval_few_shot_gsm8k(args)
|
||||
self.assertGreaterEqual(
|
||||
metrics["accuracy"],
|
||||
TEST_MODEL_MATRIX[model]["accuracy"],
|
||||
)
|
||||
finally:
|
||||
kill_process_tree(process.pid)
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ from types import SimpleNamespace
|
||||
import requests
|
||||
|
||||
from sglang.srt.utils import kill_process_tree
|
||||
from sglang.test.ascend.npu_eval_accuracy_kit import _is_pr_pipeline, run_npu_pr_smoke
|
||||
from sglang.test.ci.ci_register import register_npu_ci
|
||||
from sglang.test.run_eval import run_eval
|
||||
from sglang.test.test_utils import (
|
||||
@@ -13,7 +14,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="stage-b-test-1-npu-a3", nightly=False)
|
||||
register_npu_ci(est_time=400, suite="nightly-1-npu-a3", nightly=True)
|
||||
|
||||
|
||||
@@ -41,6 +42,9 @@ class TestAscendSamplingBackend(CustomTestCase):
|
||||
kill_process_tree(cls.process.pid)
|
||||
|
||||
def test_mmlu(self):
|
||||
if _is_pr_pipeline:
|
||||
run_npu_pr_smoke(self.base_url)
|
||||
return
|
||||
args = SimpleNamespace(
|
||||
base_url=self.base_url,
|
||||
model=self.model,
|
||||
|
||||
@@ -7,6 +7,7 @@ from sglang.srt.utils import kill_process_tree
|
||||
from sglang.test.ascend.npu_eval_accuracy_kit import NPUGSM8KMixin
|
||||
from sglang.test.ascend.test_ascend_utils import (
|
||||
DEEPSEEK_V2_LITE_W8A8_WEIGHTS_PATH,
|
||||
IMAGES_EXAMPLE_PATH,
|
||||
KIMI_VL_A3B_INSTRUCT_WEIGHTS_PATH,
|
||||
QWEN3_32B_WEIGHTS_PATH,
|
||||
)
|
||||
@@ -16,7 +17,6 @@ from sglang.test.kits.json_constrained_kit import JSONConstrainedMixin
|
||||
from sglang.test.kits.radix_cache_server_kit import run_radix_attention_test
|
||||
from sglang.test.kits.regex_constrained_kit import RegexConstrainedMixin
|
||||
from sglang.test.test_utils import (
|
||||
DEFAULT_IMAGE_URL,
|
||||
DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
|
||||
DEFAULT_URL_FOR_TEST,
|
||||
CustomTestCase,
|
||||
@@ -74,7 +74,7 @@ class TestDPAttentionMixedChunk(
|
||||
CustomTestCase,
|
||||
NPUGSM8KMixin,
|
||||
):
|
||||
gsm8k_accuracy_thres = 0.35
|
||||
gsm8k_accuracy_thres = 0.34
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
@@ -151,7 +151,7 @@ class TestDPAttentionDP2TP2VLM(CustomTestCase):
|
||||
def setUpClass(cls):
|
||||
cls.model = KIMI_VL_A3B_INSTRUCT_WEIGHTS_PATH
|
||||
cls.base_url = DEFAULT_URL_FOR_TEST
|
||||
cls.image_url = DEFAULT_IMAGE_URL
|
||||
cls.image_url = IMAGES_EXAMPLE_PATH
|
||||
cls.process = popen_launch_server(
|
||||
cls.model,
|
||||
cls.base_url,
|
||||
|
||||
+21
-17
@@ -4,6 +4,7 @@ from types import SimpleNamespace
|
||||
from urllib.parse import urlparse
|
||||
|
||||
from sglang.srt.utils import kill_process_tree
|
||||
from sglang.test.ascend.npu_eval_accuracy_kit import _is_pr_pipeline, run_npu_pr_smoke
|
||||
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 (
|
||||
@@ -13,7 +14,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="stage-b-test-1-npu-a3", nightly=False)
|
||||
register_npu_ci(est_time=400, suite="nightly-1-npu-a3", nightly=True)
|
||||
|
||||
TEST_MODEL_MATRIX = {
|
||||
@@ -49,8 +50,6 @@ class TestAscendTp1Bf16(CustomTestCase):
|
||||
def test_a_gsm8k(self):
|
||||
for model in self.models:
|
||||
with self.subTest(model=model):
|
||||
print(f"##=== Testing accuracy: {model} ===##")
|
||||
|
||||
process = popen_launch_server(
|
||||
model,
|
||||
self.base_url,
|
||||
@@ -61,21 +60,26 @@ class TestAscendTp1Bf16(CustomTestCase):
|
||||
)
|
||||
|
||||
try:
|
||||
args = SimpleNamespace(
|
||||
num_shots=5,
|
||||
data_path=None,
|
||||
num_questions=1319,
|
||||
max_new_tokens=512,
|
||||
parallel=32,
|
||||
host=f"http://{self.url.hostname}",
|
||||
port=int(self.url.port),
|
||||
)
|
||||
if _is_pr_pipeline:
|
||||
run_npu_pr_smoke(self.base_url)
|
||||
else:
|
||||
print(f"##=== Testing accuracy: {model} ===##")
|
||||
|
||||
metrics = run_eval_few_shot_gsm8k(args)
|
||||
self.assertGreaterEqual(
|
||||
metrics["accuracy"],
|
||||
TEST_MODEL_MATRIX[model]["accuracy"],
|
||||
)
|
||||
args = SimpleNamespace(
|
||||
num_shots=5,
|
||||
data_path=None,
|
||||
num_questions=1319,
|
||||
max_new_tokens=512,
|
||||
parallel=32,
|
||||
host=f"http://{self.url.hostname}",
|
||||
port=int(self.url.port),
|
||||
)
|
||||
|
||||
metrics = run_eval_few_shot_gsm8k(args)
|
||||
self.assertGreaterEqual(
|
||||
metrics["accuracy"],
|
||||
TEST_MODEL_MATRIX[model]["accuracy"],
|
||||
)
|
||||
finally:
|
||||
kill_process_tree(process.pid)
|
||||
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ from sglang.test.test_utils import (
|
||||
run_bench_one_batch,
|
||||
)
|
||||
|
||||
register_npu_ci(est_time=400, suite="stage-b-test-1-npu-a2", nightly=False)
|
||||
register_npu_ci(est_time=400, suite="stage-b-test-1-npu-a3", nightly=False)
|
||||
register_npu_ci(est_time=400, suite="nightly-1-npu-a3", nightly=True)
|
||||
|
||||
|
||||
|
||||
+4
@@ -6,6 +6,7 @@ from urllib.parse import urlparse
|
||||
import requests
|
||||
|
||||
from sglang.srt.utils import kill_process_tree
|
||||
from sglang.test.ascend.npu_eval_accuracy_kit import _is_pr_pipeline, run_npu_pr_smoke
|
||||
from sglang.test.ascend.test_ascend_utils import DEEPSEEK_R1_0528_W8A8_WEIGHTS_PATH
|
||||
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
|
||||
@@ -72,6 +73,9 @@ class TestDPAttentionRoundBinLoadBalance(CustomTestCase):
|
||||
kill_process_tree(cls.process.pid)
|
||||
|
||||
def test_gsm8k(self):
|
||||
if _is_pr_pipeline:
|
||||
run_npu_pr_smoke(self.base_url)
|
||||
return
|
||||
args = SimpleNamespace(
|
||||
num_shots=5,
|
||||
data_path=None,
|
||||
|
||||
+4
@@ -11,6 +11,7 @@ from urllib.parse import urlparse
|
||||
import requests
|
||||
|
||||
from sglang.test.ascend.disaggregation_utils import TestDisaggregationBase
|
||||
from sglang.test.ascend.npu_eval_accuracy_kit import _is_pr_pipeline, run_npu_pr_smoke
|
||||
from sglang.test.ascend.test_ascend_utils import (
|
||||
QWEN3_30B_A3B_INSTRUCT_2507_WEIGHTS_PATH,
|
||||
)
|
||||
@@ -134,6 +135,9 @@ class BaseTestNPULoadBalanceMethodDPDisaggregation(TestDisaggregationBase):
|
||||
)
|
||||
|
||||
def test_gsm8k(self):
|
||||
if _is_pr_pipeline:
|
||||
run_npu_pr_smoke(self.lb_url)
|
||||
return
|
||||
args = SimpleNamespace(
|
||||
num_shots=5,
|
||||
data_path=None,
|
||||
|
||||
+20
-16
@@ -4,6 +4,7 @@ from types import SimpleNamespace
|
||||
from urllib.parse import urlparse
|
||||
|
||||
from sglang.srt.utils import kill_process_tree
|
||||
from sglang.test.ascend.npu_eval_accuracy_kit import _is_pr_pipeline, run_npu_pr_smoke
|
||||
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 (
|
||||
@@ -67,8 +68,6 @@ class TestAscendDeepEP(CustomTestCase):
|
||||
def test_a_gsm8k(self):
|
||||
for model in self.models:
|
||||
with self.subTest(model=model):
|
||||
print(f"##=== Testing accuracy: {model} ===##")
|
||||
|
||||
process = popen_launch_server(
|
||||
model,
|
||||
self.base_url,
|
||||
@@ -79,21 +78,26 @@ class TestAscendDeepEP(CustomTestCase):
|
||||
)
|
||||
|
||||
try:
|
||||
args = SimpleNamespace(
|
||||
num_shots=5,
|
||||
data_path=None,
|
||||
num_questions=500,
|
||||
max_new_tokens=512,
|
||||
parallel=128,
|
||||
host=f"http://{self.url.hostname}",
|
||||
port=int(self.url.port),
|
||||
)
|
||||
if _is_pr_pipeline:
|
||||
run_npu_pr_smoke(self.base_url)
|
||||
else:
|
||||
print(f"##=== Testing accuracy: {model} ===##")
|
||||
|
||||
metrics = run_eval_few_shot_gsm8k(args)
|
||||
self.assertGreaterEqual(
|
||||
metrics["accuracy"],
|
||||
TEST_MODEL_MATRIX[model]["accuracy"],
|
||||
)
|
||||
args = SimpleNamespace(
|
||||
num_shots=5,
|
||||
data_path=None,
|
||||
num_questions=500,
|
||||
max_new_tokens=512,
|
||||
parallel=128,
|
||||
host=f"http://{self.url.hostname}",
|
||||
port=int(self.url.port),
|
||||
)
|
||||
|
||||
metrics = run_eval_few_shot_gsm8k(args)
|
||||
self.assertGreaterEqual(
|
||||
metrics["accuracy"],
|
||||
TEST_MODEL_MATRIX[model]["accuracy"],
|
||||
)
|
||||
finally:
|
||||
kill_process_tree(process.pid)
|
||||
|
||||
|
||||
+4
@@ -3,6 +3,7 @@ import unittest
|
||||
from types import SimpleNamespace
|
||||
|
||||
from sglang.srt.utils import kill_process_tree
|
||||
from sglang.test.ascend.npu_eval_accuracy_kit import _is_pr_pipeline, run_npu_pr_smoke
|
||||
from sglang.test.ascend.test_ascend_utils import QWEN3_30B_A3B_W8A8_WEIGHTS_PATH
|
||||
from sglang.test.ci.ci_register import register_npu_ci
|
||||
from sglang.test.run_eval import run_eval
|
||||
@@ -94,6 +95,9 @@ class TestEplbMinRebalancingUtilizationThresholdBase(CustomTestCase):
|
||||
os.remove("./rebalance_err_log.txt")
|
||||
|
||||
def test_gsm8k(self):
|
||||
if _is_pr_pipeline:
|
||||
run_npu_pr_smoke(self.base_url)
|
||||
return
|
||||
args = SimpleNamespace(
|
||||
max_tokens=512,
|
||||
base_url=DEFAULT_URL_FOR_TEST,
|
||||
|
||||
+4
@@ -2,6 +2,7 @@ import unittest
|
||||
from types import SimpleNamespace
|
||||
|
||||
from sglang.srt.utils import kill_process_tree
|
||||
from sglang.test.ascend.npu_eval_accuracy_kit import _is_pr_pipeline, run_npu_pr_smoke
|
||||
from sglang.test.ascend.test_ascend_utils import DEEPSEEK_CODER_V2_LITE_WEIGHTS_PATH
|
||||
from sglang.test.ci.ci_register import register_npu_ci
|
||||
from sglang.test.run_eval import run_eval
|
||||
@@ -61,6 +62,9 @@ class TestAscendMoeDenseTPSize(CustomTestCase):
|
||||
kill_process_tree(cls.process.pid)
|
||||
|
||||
def test_gsm8k(self):
|
||||
if _is_pr_pipeline:
|
||||
run_npu_pr_smoke(DEFAULT_URL_FOR_TEST)
|
||||
return
|
||||
args = SimpleNamespace(
|
||||
max_tokens=512,
|
||||
base_url=DEFAULT_URL_FOR_TEST,
|
||||
|
||||
@@ -4,6 +4,7 @@ from types import SimpleNamespace
|
||||
from urllib.parse import urlparse
|
||||
|
||||
from sglang.srt.utils import kill_process_tree
|
||||
from sglang.test.ascend.npu_eval_accuracy_kit import _is_pr_pipeline, run_npu_pr_smoke
|
||||
from sglang.test.ascend.test_ascend_utils import QWEN3_8B_INT4_AUTOROUND_WEIGHTS_PATH
|
||||
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
|
||||
@@ -14,7 +15,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="stage-b-test-1-npu-a3", nightly=False)
|
||||
register_npu_ci(est_time=400, suite="nightly-1-npu-a3", nightly=True)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -46,8 +47,6 @@ class TestAscendAutoRoundDense(CustomTestCase):
|
||||
def test_a_gsm8k(self):
|
||||
for model in self.models:
|
||||
with self.subTest(model=model):
|
||||
logger.info(f"##=== Testing accuracy: {model} ===##")
|
||||
|
||||
process = popen_launch_server(
|
||||
model,
|
||||
self.base_url,
|
||||
@@ -58,21 +57,26 @@ class TestAscendAutoRoundDense(CustomTestCase):
|
||||
)
|
||||
|
||||
try:
|
||||
args = SimpleNamespace(
|
||||
num_shots=5,
|
||||
data_path=None,
|
||||
num_questions=1319,
|
||||
max_new_tokens=512,
|
||||
parallel=128,
|
||||
host=f"http://{self.url.hostname}",
|
||||
port=int(self.url.port),
|
||||
)
|
||||
if _is_pr_pipeline:
|
||||
run_npu_pr_smoke(self.base_url)
|
||||
else:
|
||||
logger.info(f"##=== Testing accuracy: {model} ===##")
|
||||
|
||||
metrics = run_eval_few_shot_gsm8k(args)
|
||||
self.assertGreaterEqual(
|
||||
metrics["accuracy"],
|
||||
TEST_MODEL_MATRIX[model]["accuracy"],
|
||||
)
|
||||
args = SimpleNamespace(
|
||||
num_shots=5,
|
||||
data_path=None,
|
||||
num_questions=1319,
|
||||
max_new_tokens=512,
|
||||
parallel=128,
|
||||
host=f"http://{self.url.hostname}",
|
||||
port=int(self.url.port),
|
||||
)
|
||||
|
||||
metrics = run_eval_few_shot_gsm8k(args)
|
||||
self.assertGreaterEqual(
|
||||
metrics["accuracy"],
|
||||
TEST_MODEL_MATRIX[model]["accuracy"],
|
||||
)
|
||||
finally:
|
||||
kill_process_tree(process.pid)
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ from types import SimpleNamespace
|
||||
from urllib.parse import urlparse
|
||||
|
||||
from sglang.srt.utils import kill_process_tree
|
||||
from sglang.test.ascend.npu_eval_accuracy_kit import _is_pr_pipeline, run_npu_pr_smoke
|
||||
from sglang.test.ascend.test_ascend_utils import (
|
||||
QWEN3_30B_A3B_INSTRUCT_2507_INT4_AUTOROUND_WEIGHTS_PATH,
|
||||
)
|
||||
@@ -15,7 +16,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="stage-b-test-1-npu-a3", nightly=False)
|
||||
register_npu_ci(est_time=400, suite="nightly-1-npu-a3", nightly=True)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -47,8 +48,6 @@ class TestAscendAutoRoundMoE(CustomTestCase):
|
||||
def test_a_gsm8k(self):
|
||||
for model in self.models:
|
||||
with self.subTest(model=model):
|
||||
logger.info(f"##=== Testing accuracy: {model} ===##")
|
||||
|
||||
process = popen_launch_server(
|
||||
model,
|
||||
self.base_url,
|
||||
@@ -59,21 +58,26 @@ class TestAscendAutoRoundMoE(CustomTestCase):
|
||||
)
|
||||
|
||||
try:
|
||||
args = SimpleNamespace(
|
||||
num_shots=5,
|
||||
data_path=None,
|
||||
num_questions=1319,
|
||||
max_new_tokens=512,
|
||||
parallel=128,
|
||||
host=f"http://{self.url.hostname}",
|
||||
port=int(self.url.port),
|
||||
)
|
||||
if _is_pr_pipeline:
|
||||
run_npu_pr_smoke(self.base_url)
|
||||
else:
|
||||
logger.info(f"##=== Testing accuracy: {model} ===##")
|
||||
|
||||
metrics = run_eval_few_shot_gsm8k(args)
|
||||
self.assertGreaterEqual(
|
||||
metrics["accuracy"],
|
||||
TEST_MODEL_MATRIX[model]["accuracy"],
|
||||
)
|
||||
args = SimpleNamespace(
|
||||
num_shots=5,
|
||||
data_path=None,
|
||||
num_questions=1319,
|
||||
max_new_tokens=512,
|
||||
parallel=128,
|
||||
host=f"http://{self.url.hostname}",
|
||||
port=int(self.url.port),
|
||||
)
|
||||
|
||||
metrics = run_eval_few_shot_gsm8k(args)
|
||||
self.assertGreaterEqual(
|
||||
metrics["accuracy"],
|
||||
TEST_MODEL_MATRIX[model]["accuracy"],
|
||||
)
|
||||
finally:
|
||||
kill_process_tree(process.pid)
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ from types import SimpleNamespace
|
||||
from urllib.parse import urlparse
|
||||
|
||||
from sglang.srt.utils import kill_process_tree
|
||||
from sglang.test.ascend.npu_eval_accuracy_kit import _is_pr_pipeline, run_npu_pr_smoke
|
||||
from sglang.test.ascend.test_ascend_utils import (
|
||||
QWEN3_30B_A3B_GPTQ_2507_INT4_WEIGHTS_PATH,
|
||||
)
|
||||
@@ -16,7 +17,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="stage-b-test-1-npu-a3", nightly=False)
|
||||
register_npu_ci(est_time=400, suite="nightly-1-npu-a3", nightly=True)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -48,8 +49,6 @@ class TestAscendGPTQMoEInt4(CustomTestCase):
|
||||
def test_a_gsm8k(self):
|
||||
for model in self.models:
|
||||
with self.subTest(model=model):
|
||||
logger.info(f"##=== Testing accuracy: {model} ===##")
|
||||
|
||||
process = popen_launch_server(
|
||||
model,
|
||||
self.base_url,
|
||||
@@ -60,21 +59,26 @@ class TestAscendGPTQMoEInt4(CustomTestCase):
|
||||
)
|
||||
|
||||
try:
|
||||
args = SimpleNamespace(
|
||||
num_shots=5,
|
||||
data_path=None,
|
||||
num_questions=1319,
|
||||
max_new_tokens=512,
|
||||
parallel=128,
|
||||
host=f"http://{self.url.hostname}",
|
||||
port=int(self.url.port),
|
||||
)
|
||||
if _is_pr_pipeline:
|
||||
run_npu_pr_smoke(self.base_url)
|
||||
else:
|
||||
logger.info(f"##=== Testing accuracy: {model} ===##")
|
||||
|
||||
metrics = run_eval_few_shot_gsm8k(args)
|
||||
self.assertGreaterEqual(
|
||||
metrics["accuracy"],
|
||||
TEST_MODEL_MATRIX[model]["accuracy"],
|
||||
)
|
||||
args = SimpleNamespace(
|
||||
num_shots=5,
|
||||
data_path=None,
|
||||
num_questions=1319,
|
||||
max_new_tokens=512,
|
||||
parallel=128,
|
||||
host=f"http://{self.url.hostname}",
|
||||
port=int(self.url.port),
|
||||
)
|
||||
|
||||
metrics = run_eval_few_shot_gsm8k(args)
|
||||
self.assertGreaterEqual(
|
||||
metrics["accuracy"],
|
||||
TEST_MODEL_MATRIX[model]["accuracy"],
|
||||
)
|
||||
finally:
|
||||
kill_process_tree(process.pid)
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ from types import SimpleNamespace
|
||||
from urllib.parse import urlparse
|
||||
|
||||
from sglang.srt.utils import kill_process_tree
|
||||
from sglang.test.ascend.npu_eval_accuracy_kit import _is_pr_pipeline, run_npu_pr_smoke
|
||||
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 (
|
||||
@@ -13,7 +14,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="stage-b-test-2-npu-a3", nightly=False)
|
||||
register_npu_ci(est_time=400, suite="nightly-2-npu-a3", nightly=True)
|
||||
|
||||
TEST_MODEL_MATRIX = {
|
||||
@@ -48,8 +49,6 @@ class TestAscendMlaW8A8Int8(CustomTestCase):
|
||||
os.environ["ASCEND_USE_FIA"] = "true"
|
||||
for model in self.models:
|
||||
with self.subTest(model=model):
|
||||
print(f"##=== Testing accuracy: {model} ===##")
|
||||
|
||||
process = popen_launch_server(
|
||||
model,
|
||||
self.base_url,
|
||||
@@ -60,21 +59,26 @@ class TestAscendMlaW8A8Int8(CustomTestCase):
|
||||
)
|
||||
|
||||
try:
|
||||
args = SimpleNamespace(
|
||||
num_shots=5,
|
||||
data_path=None,
|
||||
num_questions=1319,
|
||||
max_new_tokens=512,
|
||||
parallel=128,
|
||||
host=f"http://{self.url.hostname}",
|
||||
port=int(self.url.port),
|
||||
)
|
||||
if _is_pr_pipeline:
|
||||
run_npu_pr_smoke(self.base_url)
|
||||
else:
|
||||
print(f"##=== Testing accuracy: {model} ===##")
|
||||
|
||||
metrics = run_eval_few_shot_gsm8k(args)
|
||||
self.assertGreaterEqual(
|
||||
metrics["accuracy"],
|
||||
TEST_MODEL_MATRIX[model]["accuracy"],
|
||||
)
|
||||
args = SimpleNamespace(
|
||||
num_shots=5,
|
||||
data_path=None,
|
||||
num_questions=1319,
|
||||
max_new_tokens=512,
|
||||
parallel=128,
|
||||
host=f"http://{self.url.hostname}",
|
||||
port=int(self.url.port),
|
||||
)
|
||||
|
||||
metrics = run_eval_few_shot_gsm8k(args)
|
||||
self.assertGreaterEqual(
|
||||
metrics["accuracy"],
|
||||
TEST_MODEL_MATRIX[model]["accuracy"],
|
||||
)
|
||||
finally:
|
||||
kill_process_tree(process.pid)
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ from types import SimpleNamespace
|
||||
from urllib.parse import urlparse
|
||||
|
||||
from sglang.srt.utils import kill_process_tree
|
||||
from sglang.test.ascend.npu_eval_accuracy_kit import _is_pr_pipeline, run_npu_pr_smoke
|
||||
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 (
|
||||
@@ -46,8 +47,6 @@ class TestAscendMlaW8A8Int8(CustomTestCase):
|
||||
def test_a_gsm8k(self):
|
||||
for model in self.models:
|
||||
with self.subTest(model=model):
|
||||
print(f"##=== Testing accuracy: {model} ===##")
|
||||
|
||||
process = popen_launch_server(
|
||||
model,
|
||||
self.base_url,
|
||||
@@ -58,21 +57,26 @@ class TestAscendMlaW8A8Int8(CustomTestCase):
|
||||
)
|
||||
|
||||
try:
|
||||
args = SimpleNamespace(
|
||||
num_shots=5,
|
||||
data_path=None,
|
||||
num_questions=1319,
|
||||
max_new_tokens=512,
|
||||
parallel=128,
|
||||
host=f"http://{self.url.hostname}",
|
||||
port=int(self.url.port),
|
||||
)
|
||||
if _is_pr_pipeline:
|
||||
run_npu_pr_smoke(self.base_url)
|
||||
else:
|
||||
print(f"##=== Testing accuracy: {model} ===##")
|
||||
|
||||
metrics = run_eval_few_shot_gsm8k(args)
|
||||
self.assertGreaterEqual(
|
||||
metrics["accuracy"],
|
||||
TEST_MODEL_MATRIX[model]["accuracy"],
|
||||
)
|
||||
args = SimpleNamespace(
|
||||
num_shots=5,
|
||||
data_path=None,
|
||||
num_questions=1319,
|
||||
max_new_tokens=512,
|
||||
parallel=128,
|
||||
host=f"http://{self.url.hostname}",
|
||||
port=int(self.url.port),
|
||||
)
|
||||
|
||||
metrics = run_eval_few_shot_gsm8k(args)
|
||||
self.assertGreaterEqual(
|
||||
metrics["accuracy"],
|
||||
TEST_MODEL_MATRIX[model]["accuracy"],
|
||||
)
|
||||
finally:
|
||||
kill_process_tree(process.pid)
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ from types import SimpleNamespace
|
||||
from urllib.parse import urlparse
|
||||
|
||||
from sglang.srt.utils import kill_process_tree
|
||||
from sglang.test.ascend.npu_eval_accuracy_kit import _is_pr_pipeline, run_npu_pr_smoke
|
||||
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 (
|
||||
@@ -12,7 +13,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="stage-b-test-1-npu-a3", nightly=False)
|
||||
register_npu_ci(est_time=400, suite="nightly-1-npu-a3", nightly=True)
|
||||
|
||||
TEST_MODEL_MATRIX = {
|
||||
@@ -43,8 +44,6 @@ class TestAscendTp1Bf16(CustomTestCase):
|
||||
def test_a_gsm8k(self):
|
||||
for model in self.models:
|
||||
with self.subTest(model=model):
|
||||
print(f"##=== Testing accuracy: {model} ===##")
|
||||
|
||||
process = popen_launch_server(
|
||||
model,
|
||||
self.base_url,
|
||||
@@ -55,21 +54,26 @@ class TestAscendTp1Bf16(CustomTestCase):
|
||||
)
|
||||
|
||||
try:
|
||||
args = SimpleNamespace(
|
||||
num_shots=5,
|
||||
data_path=None,
|
||||
num_questions=1319,
|
||||
max_new_tokens=512,
|
||||
parallel=128,
|
||||
host=f"http://{self.url.hostname}",
|
||||
port=int(self.url.port),
|
||||
)
|
||||
if _is_pr_pipeline:
|
||||
run_npu_pr_smoke(self.base_url)
|
||||
else:
|
||||
print(f"##=== Testing accuracy: {model} ===##")
|
||||
|
||||
metrics = run_eval_few_shot_gsm8k(args)
|
||||
self.assertGreaterEqual(
|
||||
metrics["accuracy"],
|
||||
TEST_MODEL_MATRIX[model]["accuracy"],
|
||||
)
|
||||
args = SimpleNamespace(
|
||||
num_shots=5,
|
||||
data_path=None,
|
||||
num_questions=1319,
|
||||
max_new_tokens=512,
|
||||
parallel=128,
|
||||
host=f"http://{self.url.hostname}",
|
||||
port=int(self.url.port),
|
||||
)
|
||||
|
||||
metrics = run_eval_few_shot_gsm8k(args)
|
||||
self.assertGreaterEqual(
|
||||
metrics["accuracy"],
|
||||
TEST_MODEL_MATRIX[model]["accuracy"],
|
||||
)
|
||||
finally:
|
||||
kill_process_tree(process.pid)
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ from types import SimpleNamespace
|
||||
from urllib.parse import urlparse
|
||||
|
||||
from sglang.srt.utils import kill_process_tree
|
||||
from sglang.test.ascend.npu_eval_accuracy_kit import _is_pr_pipeline, run_npu_pr_smoke
|
||||
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 (
|
||||
@@ -12,7 +13,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="stage-b-test-2-npu-a3", nightly=False)
|
||||
register_npu_ci(est_time=400, suite="nightly-2-npu-a3", nightly=True)
|
||||
|
||||
TEST_MODEL_MATRIX = {
|
||||
@@ -45,8 +46,6 @@ class TestAscendTp2Bf16(CustomTestCase):
|
||||
def test_a_gsm8k(self):
|
||||
for model in self.models:
|
||||
with self.subTest(model=model):
|
||||
print(f"##=== Testing accuracy: {model} ===##")
|
||||
|
||||
process = popen_launch_server(
|
||||
model,
|
||||
self.base_url,
|
||||
@@ -57,21 +56,26 @@ class TestAscendTp2Bf16(CustomTestCase):
|
||||
)
|
||||
|
||||
try:
|
||||
args = SimpleNamespace(
|
||||
num_shots=5,
|
||||
data_path=None,
|
||||
num_questions=1319,
|
||||
max_new_tokens=512,
|
||||
parallel=128,
|
||||
host=f"http://{self.url.hostname}",
|
||||
port=int(self.url.port),
|
||||
)
|
||||
if _is_pr_pipeline:
|
||||
run_npu_pr_smoke(self.base_url)
|
||||
else:
|
||||
print(f"##=== Testing accuracy: {model} ===##")
|
||||
|
||||
metrics = run_eval_few_shot_gsm8k(args)
|
||||
self.assertGreaterEqual(
|
||||
metrics["accuracy"],
|
||||
TEST_MODEL_MATRIX[model]["accuracy"],
|
||||
)
|
||||
args = SimpleNamespace(
|
||||
num_shots=5,
|
||||
data_path=None,
|
||||
num_questions=1319,
|
||||
max_new_tokens=512,
|
||||
parallel=128,
|
||||
host=f"http://{self.url.hostname}",
|
||||
port=int(self.url.port),
|
||||
)
|
||||
|
||||
metrics = run_eval_few_shot_gsm8k(args)
|
||||
self.assertGreaterEqual(
|
||||
metrics["accuracy"],
|
||||
TEST_MODEL_MATRIX[model]["accuracy"],
|
||||
)
|
||||
finally:
|
||||
kill_process_tree(process.pid)
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ from types import SimpleNamespace
|
||||
from urllib.parse import urlparse
|
||||
|
||||
from sglang.srt.utils import kill_process_tree
|
||||
from sglang.test.ascend.npu_eval_accuracy_kit import _is_pr_pipeline, run_npu_pr_smoke
|
||||
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 (
|
||||
@@ -13,7 +14,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="stage-b-test-2-npu-a3", nightly=False)
|
||||
register_npu_ci(est_time=400, suite="nightly-2-npu-a3", nightly=True)
|
||||
|
||||
TEST_MODEL_MATRIX = {
|
||||
@@ -48,8 +49,6 @@ class TestAscendTp2Bf16(CustomTestCase):
|
||||
os.environ["ASCEND_USE_FIA"] = "true"
|
||||
for model in self.models:
|
||||
with self.subTest(model=model):
|
||||
print(f"##=== Testing accuracy: {model} ===##")
|
||||
|
||||
process = popen_launch_server(
|
||||
model,
|
||||
self.base_url,
|
||||
@@ -60,21 +59,26 @@ class TestAscendTp2Bf16(CustomTestCase):
|
||||
)
|
||||
|
||||
try:
|
||||
args = SimpleNamespace(
|
||||
num_shots=5,
|
||||
data_path=None,
|
||||
num_questions=1319,
|
||||
max_new_tokens=512,
|
||||
parallel=128,
|
||||
host=f"http://{self.url.hostname}",
|
||||
port=int(self.url.port),
|
||||
)
|
||||
if _is_pr_pipeline:
|
||||
run_npu_pr_smoke(self.base_url)
|
||||
else:
|
||||
print(f"##=== Testing accuracy: {model} ===##")
|
||||
|
||||
metrics = run_eval_few_shot_gsm8k(args)
|
||||
self.assertGreaterEqual(
|
||||
metrics["accuracy"],
|
||||
TEST_MODEL_MATRIX[model]["accuracy"],
|
||||
)
|
||||
args = SimpleNamespace(
|
||||
num_shots=5,
|
||||
data_path=None,
|
||||
num_questions=1319,
|
||||
max_new_tokens=512,
|
||||
parallel=128,
|
||||
host=f"http://{self.url.hostname}",
|
||||
port=int(self.url.port),
|
||||
)
|
||||
|
||||
metrics = run_eval_few_shot_gsm8k(args)
|
||||
self.assertGreaterEqual(
|
||||
metrics["accuracy"],
|
||||
TEST_MODEL_MATRIX[model]["accuracy"],
|
||||
)
|
||||
finally:
|
||||
kill_process_tree(process.pid)
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ from types import SimpleNamespace
|
||||
from urllib.parse import urlparse
|
||||
|
||||
from sglang.srt.utils import kill_process_tree
|
||||
from sglang.test.ascend.npu_eval_accuracy_kit import _is_pr_pipeline, run_npu_pr_smoke
|
||||
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 (
|
||||
@@ -48,8 +49,6 @@ class TestAscendTp4Bf16(CustomTestCase):
|
||||
def test_a_gsm8k(self):
|
||||
for model in self.models:
|
||||
with self.subTest(model=model):
|
||||
print(f"##=== Testing accuracy: {model} ===##")
|
||||
|
||||
process = popen_launch_server(
|
||||
model,
|
||||
self.base_url,
|
||||
@@ -60,21 +59,26 @@ class TestAscendTp4Bf16(CustomTestCase):
|
||||
)
|
||||
|
||||
try:
|
||||
args = SimpleNamespace(
|
||||
num_shots=5,
|
||||
data_path=None,
|
||||
num_questions=1319,
|
||||
max_new_tokens=512,
|
||||
parallel=128,
|
||||
host=f"http://{self.url.hostname}",
|
||||
port=int(self.url.port),
|
||||
)
|
||||
if _is_pr_pipeline:
|
||||
run_npu_pr_smoke(self.base_url)
|
||||
else:
|
||||
print(f"##=== Testing accuracy: {model} ===##")
|
||||
|
||||
metrics = run_eval_few_shot_gsm8k(args)
|
||||
self.assertGreaterEqual(
|
||||
metrics["accuracy"],
|
||||
TEST_MODEL_MATRIX[model]["accuracy"],
|
||||
)
|
||||
args = SimpleNamespace(
|
||||
num_shots=5,
|
||||
data_path=None,
|
||||
num_questions=1319,
|
||||
max_new_tokens=512,
|
||||
parallel=128,
|
||||
host=f"http://{self.url.hostname}",
|
||||
port=int(self.url.port),
|
||||
)
|
||||
|
||||
metrics = run_eval_few_shot_gsm8k(args)
|
||||
self.assertGreaterEqual(
|
||||
metrics["accuracy"],
|
||||
TEST_MODEL_MATRIX[model]["accuracy"],
|
||||
)
|
||||
finally:
|
||||
kill_process_tree(process.pid)
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,7 @@
|
||||
import unittest
|
||||
|
||||
from sglang.srt.utils import kill_process_tree
|
||||
from sglang.test.ascend.npu_eval_accuracy_kit import NPUGSM8KMixin
|
||||
from sglang.test.ascend.test_ascend_utils import (
|
||||
QWEN3_8B_EAGLE3_WEIGHTS_PATH,
|
||||
QWEN3_8B_WEIGHTS_PATH,
|
||||
@@ -9,7 +10,6 @@ from sglang.test.ci.ci_register import register_npu_ci
|
||||
from sglang.test.kits.basic_api_contract_kit import BasicAPIContractMixin
|
||||
from sglang.test.kits.basic_decode_correctness_kit import BasicDecodeCorrectnessMixin
|
||||
from sglang.test.kits.basic_scheduler_stress_kit import BasicSchedulerStressMixin
|
||||
from sglang.test.kits.eval_accuracy_kit import GSM8KMixin
|
||||
from sglang.test.test_utils import (
|
||||
DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
|
||||
DEFAULT_URL_FOR_TEST,
|
||||
@@ -25,7 +25,7 @@ class TestBasicSanityEagle3(
|
||||
BasicAPIContractMixin,
|
||||
BasicDecodeCorrectnessMixin,
|
||||
BasicSchedulerStressMixin,
|
||||
GSM8KMixin,
|
||||
NPUGSM8KMixin,
|
||||
CustomTestCase,
|
||||
):
|
||||
served_model_name = QWEN3_8B_WEIGHTS_PATH
|
||||
|
||||
+19
-12
@@ -3,6 +3,7 @@ import unittest
|
||||
from types import SimpleNamespace
|
||||
|
||||
from sglang.srt.utils import kill_process_tree
|
||||
from sglang.test.ascend.npu_eval_accuracy_kit import _is_pr_pipeline, run_npu_pr_smoke
|
||||
from sglang.test.ascend.test_ascend_utils import (
|
||||
QWEN3_32B_EAGLE3_WEIGHTS_PATH,
|
||||
QWEN3_32B_W8A8_MINDIE_WEIGHTS_PATH,
|
||||
@@ -103,12 +104,15 @@ class TestNpuSpeculativeAttentionMode(CustomTestCase):
|
||||
)
|
||||
|
||||
try:
|
||||
metrics = self._run_gsm8k_eval()
|
||||
self.assertGreaterEqual(
|
||||
metrics["score"],
|
||||
0.83,
|
||||
f"GSM8K score {metrics['score']} below threshold 0.83",
|
||||
)
|
||||
if _is_pr_pipeline:
|
||||
run_npu_pr_smoke(DEFAULT_URL_FOR_TEST)
|
||||
else:
|
||||
metrics = self._run_gsm8k_eval()
|
||||
self.assertGreaterEqual(
|
||||
metrics["score"],
|
||||
0.83,
|
||||
f"GSM8K score {metrics['score']} below threshold 0.83",
|
||||
)
|
||||
finally:
|
||||
kill_process_tree(process.pid)
|
||||
|
||||
@@ -164,12 +168,15 @@ class TestNpuSpeculativeAttentionMode(CustomTestCase):
|
||||
)
|
||||
|
||||
try:
|
||||
metrics = self._run_gsm8k_eval()
|
||||
self.assertGreaterEqual(
|
||||
metrics["score"],
|
||||
0.83,
|
||||
f"GSM8K score {metrics['score']} below threshold 0.83",
|
||||
)
|
||||
if _is_pr_pipeline:
|
||||
run_npu_pr_smoke(DEFAULT_URL_FOR_TEST)
|
||||
else:
|
||||
metrics = self._run_gsm8k_eval()
|
||||
self.assertGreaterEqual(
|
||||
metrics["score"],
|
||||
0.83,
|
||||
f"GSM8K score {metrics['score']} below threshold 0.83",
|
||||
)
|
||||
finally:
|
||||
kill_process_tree(process.pid)
|
||||
|
||||
|
||||
+4
@@ -4,6 +4,7 @@ from types import SimpleNamespace
|
||||
from urllib.parse import urlparse
|
||||
|
||||
from sglang.srt.utils import kill_process_tree
|
||||
from sglang.test.ascend.npu_eval_accuracy_kit import _is_pr_pipeline, run_npu_pr_smoke
|
||||
from sglang.test.ascend.test_ascend_utils import (
|
||||
DEEPSEEK_R1_0528_W4A8_PER_CHANNEL_WEIGHTS_PATH,
|
||||
)
|
||||
@@ -87,6 +88,9 @@ class TestAscendSpeculativeDraftAttentionAndMoeRunner(CustomTestCase):
|
||||
kill_process_tree(cls.process.pid)
|
||||
|
||||
def test_a_gsm8k(self):
|
||||
if _is_pr_pipeline:
|
||||
run_npu_pr_smoke(self.base_url)
|
||||
return
|
||||
args = SimpleNamespace(
|
||||
base_url=self.base_url,
|
||||
eval_name="gsm8k",
|
||||
|
||||
+22
-17
@@ -4,6 +4,7 @@ from types import SimpleNamespace
|
||||
from urllib.parse import urlparse
|
||||
|
||||
from sglang.srt.utils import kill_process_tree
|
||||
from sglang.test.ascend.npu_eval_accuracy_kit import _is_pr_pipeline, run_npu_pr_smoke
|
||||
from sglang.test.ascend.test_ascend_utils import (
|
||||
DEEPSEEK_R1_0528_W8A8_WEIGHTS_PATH,
|
||||
)
|
||||
@@ -64,7 +65,6 @@ class TestAscendDistTimeout(CustomTestCase):
|
||||
]
|
||||
|
||||
def test_a_gsm8k(self):
|
||||
print(f"##=== Testing accuracy: {self.model} ===##")
|
||||
process = popen_launch_server(
|
||||
self.model,
|
||||
self.base_url,
|
||||
@@ -74,23 +74,28 @@ class TestAscendDistTimeout(CustomTestCase):
|
||||
)
|
||||
|
||||
try:
|
||||
args = SimpleNamespace(
|
||||
base_url=self.base_url,
|
||||
eval_name="gsm8k",
|
||||
api="completion",
|
||||
num_examples=1319,
|
||||
num_threads=128,
|
||||
max_tokens=512,
|
||||
num_shots=5,
|
||||
temperature=0.0,
|
||||
)
|
||||
if _is_pr_pipeline:
|
||||
run_npu_pr_smoke(self.base_url)
|
||||
else:
|
||||
print(f"##=== Testing accuracy: {self.model} ===##")
|
||||
|
||||
metrics = run_eval(args)
|
||||
self.assertGreaterEqual(
|
||||
metrics["score"],
|
||||
self.accuracy,
|
||||
f"GSM8K score {metrics['score']} below threshold {self.accuracy}",
|
||||
)
|
||||
args = SimpleNamespace(
|
||||
base_url=self.base_url,
|
||||
eval_name="gsm8k",
|
||||
api="completion",
|
||||
num_examples=1319,
|
||||
num_threads=128,
|
||||
max_tokens=512,
|
||||
num_shots=5,
|
||||
temperature=0.0,
|
||||
)
|
||||
|
||||
metrics = run_eval(args)
|
||||
self.assertGreaterEqual(
|
||||
metrics["score"],
|
||||
self.accuracy,
|
||||
f"GSM8K score {metrics['score']} below threshold {self.accuracy}",
|
||||
)
|
||||
finally:
|
||||
kill_process_tree(process.pid)
|
||||
|
||||
|
||||
+33
-27
@@ -3,6 +3,7 @@ import unittest
|
||||
from types import SimpleNamespace
|
||||
|
||||
from sglang.srt.utils import kill_process_tree
|
||||
from sglang.test.ascend.npu_eval_accuracy_kit import _is_pr_pipeline, run_npu_pr_smoke
|
||||
from sglang.test.ascend.test_ascend_utils import (
|
||||
FR_SPEC_TOKEN_MAP_PATH,
|
||||
LLAMA_3_8B_EAGLE_WEIGHTS_PATH,
|
||||
@@ -77,24 +78,26 @@ class TestNpuSpeculativeTokenMap(CustomTestCase):
|
||||
env=env,
|
||||
)
|
||||
try:
|
||||
eval_args = SimpleNamespace(
|
||||
base_url=DEFAULT_URL_FOR_TEST,
|
||||
eval_name="gsm8k",
|
||||
api="completion",
|
||||
num_examples=1319,
|
||||
num_threads=128,
|
||||
max_tokens=512,
|
||||
num_shots=5,
|
||||
temperature=0.0,
|
||||
)
|
||||
metrics = run_eval(eval_args)
|
||||
self.assertGreaterEqual(metrics["score"], 0.83)
|
||||
if _is_pr_pipeline:
|
||||
run_npu_pr_smoke(DEFAULT_URL_FOR_TEST)
|
||||
else:
|
||||
eval_args = SimpleNamespace(
|
||||
base_url=DEFAULT_URL_FOR_TEST,
|
||||
eval_name="gsm8k",
|
||||
api="completion",
|
||||
num_examples=1319,
|
||||
num_threads=128,
|
||||
max_tokens=512,
|
||||
num_shots=5,
|
||||
temperature=0.0,
|
||||
)
|
||||
metrics = run_eval(eval_args)
|
||||
self.assertGreaterEqual(metrics["score"], 0.83)
|
||||
finally:
|
||||
kill_process_tree(process.pid)
|
||||
|
||||
def test_eagle_with_valid_token_map_gsm8k(self):
|
||||
"""EAGLE (EAGLE-2) with valid token map; GSM8K accuracy should meet threshold."""
|
||||
|
||||
args = [
|
||||
"--trust-remote-code",
|
||||
"--attention-backend",
|
||||
@@ -135,20 +138,23 @@ class TestNpuSpeculativeTokenMap(CustomTestCase):
|
||||
env=env,
|
||||
)
|
||||
try:
|
||||
eval_args = SimpleNamespace(
|
||||
base_url=DEFAULT_URL_FOR_TEST,
|
||||
eval_name="gsm8k",
|
||||
api="completion",
|
||||
num_examples=1319,
|
||||
num_threads=128,
|
||||
max_tokens=512,
|
||||
num_shots=5,
|
||||
temperature=0.0,
|
||||
)
|
||||
metrics = run_eval(eval_args)
|
||||
self.assertGreaterEqual(
|
||||
metrics["score"], 0.75
|
||||
) # adjust threshold as needed
|
||||
if _is_pr_pipeline:
|
||||
run_npu_pr_smoke(DEFAULT_URL_FOR_TEST)
|
||||
else:
|
||||
eval_args = SimpleNamespace(
|
||||
base_url=DEFAULT_URL_FOR_TEST,
|
||||
eval_name="gsm8k",
|
||||
api="completion",
|
||||
num_examples=1319,
|
||||
num_threads=128,
|
||||
max_tokens=512,
|
||||
num_shots=5,
|
||||
temperature=0.0,
|
||||
)
|
||||
metrics = run_eval(eval_args)
|
||||
self.assertGreaterEqual(
|
||||
metrics["score"], 0.75
|
||||
) # adjust threshold as needed
|
||||
finally:
|
||||
kill_process_tree(process.pid)
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ from sglang.test.ascend.test_ascend_utils import LLAMA_2_7B_WEIGHTS_PATH
|
||||
from sglang.test.ci.ci_register import register_npu_ci
|
||||
from sglang.test.test_utils import CustomTestCase
|
||||
|
||||
register_npu_ci(est_time=400, suite="nightly-2-npu-a3")
|
||||
register_npu_ci(est_time=400, suite="nightly-2-npu-a3", nightly=True)
|
||||
|
||||
|
||||
class TestLlama(GSM8KAscendMixin, CustomTestCase):
|
||||
|
||||
@@ -5,7 +5,7 @@ from sglang.test.ascend.test_ascend_utils import QWEN3_8B_WEIGHTS_PATH
|
||||
from sglang.test.ci.ci_register import register_npu_ci
|
||||
from sglang.test.test_utils import CustomTestCase
|
||||
|
||||
register_npu_ci(est_time=400, suite="nightly-2-npu-a3")
|
||||
register_npu_ci(est_time=400, suite="nightly-2-npu-a3", nightly=True)
|
||||
|
||||
|
||||
class TestQwen38BCommQuantization(GSM8KAscendMixin, CustomTestCase):
|
||||
|
||||
@@ -11,7 +11,8 @@ from sglang.srt.layers.attention import vision
|
||||
from sglang.test.ci.ci_register import register_cpu_ci, register_npu_ci
|
||||
|
||||
register_cpu_ci(est_time=2, suite="base-a-test-cpu")
|
||||
register_npu_ci(est_time=2, suite="stage-b-test-1-npu-a2")
|
||||
register_npu_ci(est_time=2, suite="stage-b-test-1-npu-a3")
|
||||
register_npu_ci(est_time=2, suite="nightly-1-npu-a3", nightly=True)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
||||
+3
-2
@@ -100,9 +100,10 @@ PER_COMMIT_SUITES = {
|
||||
HWBackend.NPU: [
|
||||
"base-a-test-1-gpu-small",
|
||||
"stage-a-unit-test-npu",
|
||||
"stage-b-test-1-npu-a2",
|
||||
"stage-b-test-2-npu-a2",
|
||||
"stage-b-test-1-npu-a3",
|
||||
"stage-b-test-2-npu-a3",
|
||||
"stage-b-test-4-npu-a3",
|
||||
"stage-b-test-8-npu-a3",
|
||||
"stage-b-test-16-npu-a3",
|
||||
],
|
||||
HWBackend.XPU: [
|
||||
|
||||
Reference in New Issue
Block a user