[CI] Add GLM52 NVFP4 MTP B200 tests (#30021)
This commit is contained in:
@@ -33,14 +33,14 @@ class DsaMtpEvalConfigDefaults:
|
|||||||
"""Eval thresholds & params shared across DSA-MTP regression variants."""
|
"""Eval thresholds & params shared across DSA-MTP regression variants."""
|
||||||
|
|
||||||
# GSM8KMixin defaults.
|
# GSM8KMixin defaults.
|
||||||
gsm8k_accuracy_thres = 0.94
|
gsm8k_accuracy_thres = 0.935
|
||||||
gsm8k_accept_length_thres = 2.7
|
gsm8k_accept_length_thres = 3.7
|
||||||
gsm8k_num_questions = 500
|
gsm8k_num_questions = 500
|
||||||
gsm8k_num_threads = 500
|
gsm8k_num_threads = 500
|
||||||
gsm8k_num_shots = 20
|
gsm8k_num_shots = 20
|
||||||
|
|
||||||
# SpecDecodingMixin default; per-variant subclasses set `bs_1_speed_thres`.
|
# SpecDecodingMixin default; per-variant subclasses set `bs_1_speed_thres`.
|
||||||
accept_length_thres = 2.7
|
accept_length_thres = 4.0
|
||||||
|
|
||||||
|
|
||||||
class DsaMtpServerBase(CustomTestCase):
|
class DsaMtpServerBase(CustomTestCase):
|
||||||
@@ -48,21 +48,24 @@ class DsaMtpServerBase(CustomTestCase):
|
|||||||
|
|
||||||
# Subclasses must set `model`; the others have sensible defaults.
|
# Subclasses must set `model`; the others have sensible defaults.
|
||||||
model: str = ""
|
model: str = ""
|
||||||
|
tp_size: int = 8
|
||||||
|
dp_size: int = 8
|
||||||
mem_fraction_static: float = 0.7
|
mem_fraction_static: float = 0.7
|
||||||
enable_dp_attention: bool = False
|
enable_dp_attention: bool = False
|
||||||
|
extra_server_args = ()
|
||||||
|
|
||||||
# EAGLE MTP config (fixed across DSA-MTP variants).
|
# EAGLE MTP config (fixed across DSA-MTP variants).
|
||||||
speculative_algorithm: str = "EAGLE"
|
speculative_algorithm: str = "EAGLE"
|
||||||
speculative_num_steps: int = 3
|
speculative_num_steps: int = 5
|
||||||
speculative_eagle_topk: int = 1
|
speculative_eagle_topk: int = 1
|
||||||
speculative_num_draft_tokens: int = 4
|
speculative_num_draft_tokens: int = 6
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_server_args(cls):
|
def get_server_args(cls):
|
||||||
assert cls.model, f"{cls.__name__} must set `model`"
|
assert cls.model, f"{cls.__name__} must set `model`"
|
||||||
args = ["--trust-remote-code", "--tp", "8"]
|
args = ["--trust-remote-code", "--tp", str(cls.tp_size)]
|
||||||
if cls.enable_dp_attention:
|
if cls.enable_dp_attention:
|
||||||
args += ["--dp", "8", "--enable-dp-attention"]
|
args += ["--dp", str(cls.dp_size), "--enable-dp-attention"]
|
||||||
args += [
|
args += [
|
||||||
"--speculative-algorithm",
|
"--speculative-algorithm",
|
||||||
cls.speculative_algorithm,
|
cls.speculative_algorithm,
|
||||||
@@ -77,6 +80,7 @@ class DsaMtpServerBase(CustomTestCase):
|
|||||||
"--model-loader-extra-config",
|
"--model-loader-extra-config",
|
||||||
'{"enable_multithread_load": true, "num_threads": 64}',
|
'{"enable_multithread_load": true, "num_threads": 64}',
|
||||||
]
|
]
|
||||||
|
args += list(cls.extra_server_args)
|
||||||
return args
|
return args
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -90,4 +94,5 @@ class DsaMtpServerBase(CustomTestCase):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
|
if hasattr(cls, "process") and cls.process:
|
||||||
kill_process_tree(cls.process.pid)
|
kill_process_tree(cls.process.pid)
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
import unittest
|
||||||
|
|
||||||
|
from sglang.test.ci.ci_register import register_cuda_ci
|
||||||
|
from sglang.test.kits.eval_accuracy_kit import GSM8KMixin
|
||||||
|
from sglang.test.kits.spec_decoding_kit import SpecDecodingMixin
|
||||||
|
from sglang.test.server_fixtures.dsa_mtp_fixture import (
|
||||||
|
DsaMtpEvalConfigDefaults,
|
||||||
|
DsaMtpServerBase,
|
||||||
|
)
|
||||||
|
|
||||||
|
register_cuda_ci(
|
||||||
|
est_time=400,
|
||||||
|
stage="base-c",
|
||||||
|
runner_config="4-gpu-b200",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class TestGLM52NVFP4DPMTP(
|
||||||
|
DsaMtpServerBase, DsaMtpEvalConfigDefaults, GSM8KMixin, SpecDecodingMixin
|
||||||
|
):
|
||||||
|
model = "nvidia/GLM-5.2-NVFP4"
|
||||||
|
tp_size = 4
|
||||||
|
dp_size = 4
|
||||||
|
mem_fraction_static = 0.88
|
||||||
|
enable_dp_attention = True
|
||||||
|
bs_1_speed_thres = 180
|
||||||
|
extra_server_args = [
|
||||||
|
"--moe-runner-backend",
|
||||||
|
"flashinfer_trtllm",
|
||||||
|
"--quantization",
|
||||||
|
"modelopt_fp4",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
unittest.main()
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
import unittest
|
||||||
|
|
||||||
|
from sglang.test.ci.ci_register import register_cuda_ci
|
||||||
|
from sglang.test.kits.eval_accuracy_kit import GSM8KMixin
|
||||||
|
from sglang.test.kits.spec_decoding_kit import SpecDecodingMixin
|
||||||
|
from sglang.test.server_fixtures.dsa_mtp_fixture import (
|
||||||
|
DsaMtpEvalConfigDefaults,
|
||||||
|
DsaMtpServerBase,
|
||||||
|
)
|
||||||
|
|
||||||
|
register_cuda_ci(
|
||||||
|
est_time=400,
|
||||||
|
stage="base-c",
|
||||||
|
runner_config="4-gpu-b200",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class TestGLM52NVFP4TPMTP(
|
||||||
|
DsaMtpServerBase, DsaMtpEvalConfigDefaults, GSM8KMixin, SpecDecodingMixin
|
||||||
|
):
|
||||||
|
model = "nvidia/GLM-5.2-NVFP4"
|
||||||
|
tp_size = 4
|
||||||
|
mem_fraction_static = 0.8
|
||||||
|
bs_1_speed_thres = 300
|
||||||
|
extra_server_args = [
|
||||||
|
"--moe-runner-backend",
|
||||||
|
"flashinfer_trtllm",
|
||||||
|
"--quantization",
|
||||||
|
"modelopt_fp4",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
unittest.main()
|
||||||
Reference in New Issue
Block a user