Update GLM tests to 5.2 and delete redundant tests (#29686)
This commit is contained in:
@@ -1,200 +0,0 @@
|
|||||||
import unittest
|
|
||||||
|
|
||||||
from sglang.test.accuracy_test_runner import AccuracyTestParams
|
|
||||||
from sglang.test.ci.ci_register import register_cuda_ci
|
|
||||||
from sglang.test.performance_test_runner import PerformanceTestParams
|
|
||||||
from sglang.test.run_combined_tests import run_combined_tests
|
|
||||||
from sglang.test.test_utils import ModelLaunchSettings, is_blackwell_system
|
|
||||||
from sglang.test.tool_call_test_runner import ToolCallTestParams
|
|
||||||
|
|
||||||
register_cuda_ci(est_time=5400, suite="nightly-8-gpu-common", nightly=True)
|
|
||||||
|
|
||||||
DEEPSEEK_V32_MODEL_PATH = "deepseek-ai/DeepSeek-V3.2"
|
|
||||||
|
|
||||||
BASE_ARGS = [
|
|
||||||
"--trust-remote-code",
|
|
||||||
"--model-loader-extra-config",
|
|
||||||
'{"enable_multithread_load": true}',
|
|
||||||
]
|
|
||||||
|
|
||||||
TOOL_CALL_ARGS = [
|
|
||||||
"--tool-call-parser=deepseekv32",
|
|
||||||
"--reasoning-parser=deepseek-v3",
|
|
||||||
]
|
|
||||||
|
|
||||||
DP_ARGS = [
|
|
||||||
"--tp=8",
|
|
||||||
"--dp=8",
|
|
||||||
"--enable-dp-attention",
|
|
||||||
]
|
|
||||||
|
|
||||||
# Accuracy thresholds
|
|
||||||
GSM8K_BASELINE = 0.935
|
|
||||||
GPQA_BASELINE = 0.83
|
|
||||||
|
|
||||||
|
|
||||||
class TestDeepseekV32(unittest.TestCase):
|
|
||||||
"""Unified test class for DeepSeek V3.2 performance and accuracy.
|
|
||||||
|
|
||||||
Tests multiple variants with both performance and accuracy tests:
|
|
||||||
- dp: Standard TP=8 + DP=8 with dp-attention
|
|
||||||
- dp+mtp: DP + EAGLE speculative decoding
|
|
||||||
- tp: Pure TP=8 only
|
|
||||||
- tp+mtp: Pure TP=8 + EAGLE speculative decoding
|
|
||||||
"""
|
|
||||||
|
|
||||||
def test_deepseek_v32_all_variants(self):
|
|
||||||
"""Run performance and accuracy for all DeepSeek V3.2 variants."""
|
|
||||||
TP_ARGS = [
|
|
||||||
"--tp=8",
|
|
||||||
]
|
|
||||||
MTP_ARGS = [
|
|
||||||
"--speculative-algorithm=EAGLE",
|
|
||||||
"--speculative-num-steps=3",
|
|
||||||
"--speculative-eagle-topk=1",
|
|
||||||
"--speculative-num-draft-tokens=4",
|
|
||||||
"--mem-frac=0.85",
|
|
||||||
]
|
|
||||||
variants = [
|
|
||||||
# Variant: "dp" - Standard TP=8 + DP=8 with dp-attention
|
|
||||||
ModelLaunchSettings(
|
|
||||||
DEEPSEEK_V32_MODEL_PATH,
|
|
||||||
tp_size=8,
|
|
||||||
extra_args=BASE_ARGS + DP_ARGS + TOOL_CALL_ARGS,
|
|
||||||
variant="DP8",
|
|
||||||
),
|
|
||||||
# Variant: "dp+mtp" - DP + EAGLE speculative decoding
|
|
||||||
ModelLaunchSettings(
|
|
||||||
DEEPSEEK_V32_MODEL_PATH,
|
|
||||||
tp_size=8,
|
|
||||||
extra_args=BASE_ARGS + DP_ARGS + TOOL_CALL_ARGS + MTP_ARGS,
|
|
||||||
variant="DP8+MTP",
|
|
||||||
),
|
|
||||||
# Variant: "tp" - Pure TP=8 only
|
|
||||||
ModelLaunchSettings(
|
|
||||||
DEEPSEEK_V32_MODEL_PATH,
|
|
||||||
tp_size=8,
|
|
||||||
extra_args=BASE_ARGS + TP_ARGS + TOOL_CALL_ARGS,
|
|
||||||
variant="TP8",
|
|
||||||
),
|
|
||||||
# Variant: "tp+mtp" - Pure TP=8 + EAGLE speculative decoding
|
|
||||||
ModelLaunchSettings(
|
|
||||||
DEEPSEEK_V32_MODEL_PATH,
|
|
||||||
tp_size=8,
|
|
||||||
extra_args=BASE_ARGS + TP_ARGS + TOOL_CALL_ARGS + MTP_ARGS,
|
|
||||||
variant="TP8+MTP",
|
|
||||||
),
|
|
||||||
]
|
|
||||||
|
|
||||||
run_combined_tests(
|
|
||||||
models=variants,
|
|
||||||
test_name="DeepSeek-V3.2",
|
|
||||||
accuracy_params=AccuracyTestParams(
|
|
||||||
dataset="gsm8k", baseline_accuracy=GSM8K_BASELINE
|
|
||||||
),
|
|
||||||
performance_params=PerformanceTestParams(
|
|
||||||
batch_sizes=[1, 8, 16, 64],
|
|
||||||
profile_dir="performance_profiles_deepseek_v32",
|
|
||||||
),
|
|
||||||
tool_call_params=ToolCallTestParams(
|
|
||||||
test_thinking=True, test_reasoning_usage=True
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
@unittest.skipIf(is_blackwell_system(), "Requires H200 system")
|
|
||||||
def test_deepseek_v32_dsa_backends(self):
|
|
||||||
"""Test DSA attention backend variants (H200 only).
|
|
||||||
|
|
||||||
Tests three DSA backend configurations:
|
|
||||||
- flashmla: flashmla_sparse prefill + flashmla_kv decode
|
|
||||||
- fa3: FA3 prefill + FA3 decode
|
|
||||||
- fp8kvcache: default backends with FP8 KV cache
|
|
||||||
"""
|
|
||||||
DSA_FLASHMLA_ARGS = [
|
|
||||||
"--attention-backend=dsa",
|
|
||||||
"--dsa-prefill-backend=flashmla_sparse",
|
|
||||||
"--dsa-decode-backend=flashmla_kv",
|
|
||||||
]
|
|
||||||
|
|
||||||
DSA_FA3_ARGS = [
|
|
||||||
"--attention-backend=dsa",
|
|
||||||
"--dsa-prefill-backend=fa3",
|
|
||||||
"--dsa-decode-backend=fa3",
|
|
||||||
]
|
|
||||||
|
|
||||||
DSA_FP8KV_ARGS = [
|
|
||||||
"--attention-backend=dsa",
|
|
||||||
"--kv-cache-dtype=fp8_e4m3",
|
|
||||||
]
|
|
||||||
|
|
||||||
dsa_variants = [
|
|
||||||
# flashmla backend
|
|
||||||
ModelLaunchSettings(
|
|
||||||
DEEPSEEK_V32_MODEL_PATH,
|
|
||||||
tp_size=8,
|
|
||||||
extra_args=BASE_ARGS + DP_ARGS + DSA_FLASHMLA_ARGS,
|
|
||||||
),
|
|
||||||
# fa3 backend
|
|
||||||
ModelLaunchSettings(
|
|
||||||
DEEPSEEK_V32_MODEL_PATH,
|
|
||||||
tp_size=8,
|
|
||||||
extra_args=BASE_ARGS + DP_ARGS + DSA_FA3_ARGS,
|
|
||||||
),
|
|
||||||
# fp8 kv cache
|
|
||||||
ModelLaunchSettings(
|
|
||||||
DEEPSEEK_V32_MODEL_PATH,
|
|
||||||
tp_size=8,
|
|
||||||
extra_args=BASE_ARGS + DP_ARGS + DSA_FP8KV_ARGS,
|
|
||||||
),
|
|
||||||
]
|
|
||||||
|
|
||||||
run_combined_tests(
|
|
||||||
models=dsa_variants,
|
|
||||||
test_name="DeepSeek-V3.2 DSA Backends",
|
|
||||||
accuracy_params=AccuracyTestParams(
|
|
||||||
dataset="gsm8k", baseline_accuracy=GSM8K_BASELINE
|
|
||||||
),
|
|
||||||
performance_params=None,
|
|
||||||
)
|
|
||||||
|
|
||||||
@unittest.skipIf(
|
|
||||||
not is_blackwell_system(),
|
|
||||||
"Hardware agnostic - just using B200 for efficiency reasons",
|
|
||||||
)
|
|
||||||
def test_deepseek_v32_b200(self):
|
|
||||||
"""Test DeepSeek V3.2 with GPQA evaluation using thinking mode (B200 only).
|
|
||||||
|
|
||||||
This test runs GPQA evaluation with the reasoning parser enabled.
|
|
||||||
"""
|
|
||||||
B200_REASONING_ARGS = [
|
|
||||||
"--tool-call-parser=deepseekv32",
|
|
||||||
"--reasoning-parser=deepseek-v3",
|
|
||||||
]
|
|
||||||
|
|
||||||
variants = [
|
|
||||||
ModelLaunchSettings(
|
|
||||||
DEEPSEEK_V32_MODEL_PATH,
|
|
||||||
tp_size=8,
|
|
||||||
extra_args=BASE_ARGS + DP_ARGS + B200_REASONING_ARGS,
|
|
||||||
),
|
|
||||||
]
|
|
||||||
|
|
||||||
run_combined_tests(
|
|
||||||
models=variants,
|
|
||||||
test_name="DeepSeek-V3.2 GPQA (B200)",
|
|
||||||
accuracy_params=AccuracyTestParams(
|
|
||||||
dataset="gpqa",
|
|
||||||
baseline_accuracy=GPQA_BASELINE,
|
|
||||||
num_examples=198,
|
|
||||||
num_threads=198,
|
|
||||||
max_tokens=120000,
|
|
||||||
thinking_mode="deepseek-v3",
|
|
||||||
temperature=0.1,
|
|
||||||
repeat=4,
|
|
||||||
),
|
|
||||||
performance_params=None, # Skip performance test for GPQA
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
unittest.main()
|
|
||||||
+9
-9
@@ -9,7 +9,7 @@ from sglang.test.test_utils import ModelLaunchSettings
|
|||||||
# Runs on both H200 and B200 via nightly-8-gpu-common suite
|
# Runs on both H200 and B200 via nightly-8-gpu-common suite
|
||||||
register_cuda_ci(est_time=1800, suite="nightly-8-gpu-common", nightly=True)
|
register_cuda_ci(est_time=1800, suite="nightly-8-gpu-common", nightly=True)
|
||||||
|
|
||||||
GLM_51_FP8_MODEL_PATH = "zai-org/GLM-5.1-FP8"
|
GLM_52_FP8_MODEL_PATH = "zai-org/GLM-5.2-FP8"
|
||||||
|
|
||||||
COMMON_ARGS = [
|
COMMON_ARGS = [
|
||||||
"--trust-remote-code",
|
"--trust-remote-code",
|
||||||
@@ -27,27 +27,27 @@ MTP_ARGS = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
class TestGlm51Fp8(unittest.TestCase):
|
class TestGlm52Fp8(unittest.TestCase):
|
||||||
"""GLM-5.1 FP8 on H200/B200 (8-GPU, tp=8)."""
|
"""GLM-5.2 FP8 on H200/B200 (8-GPU, tp=8)."""
|
||||||
|
|
||||||
def test_glm51_fp8(self):
|
def test_glm52_fp8(self):
|
||||||
dp_args = ["--dp=8", "--enable-dp-attention"]
|
dp_args = ["--dp=8", "--enable-dp-attention"]
|
||||||
|
|
||||||
variants = [
|
variants = [
|
||||||
ModelLaunchSettings(
|
ModelLaunchSettings(
|
||||||
GLM_51_FP8_MODEL_PATH,
|
GLM_52_FP8_MODEL_PATH,
|
||||||
tp_size=8,
|
tp_size=8,
|
||||||
extra_args=COMMON_ARGS,
|
extra_args=COMMON_ARGS,
|
||||||
variant="TP8",
|
variant="TP8",
|
||||||
),
|
),
|
||||||
ModelLaunchSettings(
|
ModelLaunchSettings(
|
||||||
GLM_51_FP8_MODEL_PATH,
|
GLM_52_FP8_MODEL_PATH,
|
||||||
tp_size=8,
|
tp_size=8,
|
||||||
extra_args=COMMON_ARGS + dp_args,
|
extra_args=COMMON_ARGS + dp_args,
|
||||||
variant="TP8+DP8",
|
variant="TP8+DP8",
|
||||||
),
|
),
|
||||||
ModelLaunchSettings(
|
ModelLaunchSettings(
|
||||||
GLM_51_FP8_MODEL_PATH,
|
GLM_52_FP8_MODEL_PATH,
|
||||||
tp_size=8,
|
tp_size=8,
|
||||||
extra_args=COMMON_ARGS + dp_args + MTP_ARGS,
|
extra_args=COMMON_ARGS + dp_args + MTP_ARGS,
|
||||||
variant="TP8+DP8+MTP",
|
variant="TP8+DP8+MTP",
|
||||||
@@ -56,10 +56,10 @@ class TestGlm51Fp8(unittest.TestCase):
|
|||||||
|
|
||||||
run_combined_tests(
|
run_combined_tests(
|
||||||
models=variants,
|
models=variants,
|
||||||
test_name="GLM-5.1-FP8",
|
test_name="GLM-5.2-FP8",
|
||||||
accuracy_params=AccuracyTestParams(dataset="gsm8k", baseline_accuracy=0.92),
|
accuracy_params=AccuracyTestParams(dataset="gsm8k", baseline_accuracy=0.92),
|
||||||
performance_params=PerformanceTestParams(
|
performance_params=PerformanceTestParams(
|
||||||
profile_dir="performance_profiles_glm_51_fp8",
|
profile_dir="performance_profiles_glm_52_fp8",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
+5
-5
@@ -13,20 +13,20 @@ from sglang.test.test_utils import (
|
|||||||
|
|
||||||
register_cuda_ci(est_time=900, stage="base-c", runner_config="4-gpu-b200")
|
register_cuda_ci(est_time=900, stage="base-c", runner_config="4-gpu-b200")
|
||||||
|
|
||||||
GLM5_FP4_MODEL = "nvidia/GLM-5-NVFP4"
|
GLM52_FP4_MODEL = "nvidia/GLM-5.2-NVFP4"
|
||||||
|
|
||||||
|
|
||||||
class TestPCGGlm5Fp4(CustomTestCase):
|
class TestPCGGlm52Fp4(CustomTestCase):
|
||||||
"""PCG prefill on GLM-5-NVFP4 (DSA model, TP=4, B200).
|
"""PCG prefill on GLM-5.2-NVFP4 (DSA model, TP=4, B200).
|
||||||
|
|
||||||
GLM-5 uses GlmMoeDsaForCausalLM (DSA attention). This test verifies that
|
GLM-5.2 uses GlmMoeDsaForCausalLM (DSA attention). This test verifies that
|
||||||
piecewise CUDA graph works correctly after the DSA indexer was updated to
|
piecewise CUDA graph works correctly after the DSA indexer was updated to
|
||||||
cache k_fp8/k_scale for PCG-compatible prefill.
|
cache k_fp8/k_scale for PCG-compatible prefill.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
cls.model = GLM5_FP4_MODEL
|
cls.model = GLM52_FP4_MODEL
|
||||||
cls.base_url = DEFAULT_URL_FOR_TEST
|
cls.base_url = DEFAULT_URL_FOR_TEST
|
||||||
cls.process = popen_launch_server(
|
cls.process = popen_launch_server(
|
||||||
cls.model,
|
cls.model,
|
||||||
+4
-4
@@ -13,15 +13,15 @@ from sglang.test.test_utils import (
|
|||||||
|
|
||||||
register_cuda_ci(est_time=900, stage="base-c", runner_config="8-gpu-h200")
|
register_cuda_ci(est_time=900, stage="base-c", runner_config="8-gpu-h200")
|
||||||
|
|
||||||
GLM5_FP8_MODEL = "zai-org/GLM-5-FP8"
|
GLM52_FP8_MODEL = "zai-org/GLM-5.2-FP8"
|
||||||
|
|
||||||
|
|
||||||
class TestBCGGlm5Fp8TP8(CustomTestCase):
|
class TestBCGGlm52Fp8TP8(CustomTestCase):
|
||||||
"""Breakable CUDA graph prefill on GLM-5-FP8 (DSA model, TP=8, H200)."""
|
"""Breakable CUDA graph prefill on GLM-5.2-FP8 (DSA model, TP=8, H200)."""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
cls.model = GLM5_FP8_MODEL
|
cls.model = GLM52_FP8_MODEL
|
||||||
cls.base_url = DEFAULT_URL_FOR_TEST
|
cls.base_url = DEFAULT_URL_FOR_TEST
|
||||||
cls.process = popen_launch_server(
|
cls.process = popen_launch_server(
|
||||||
cls.model,
|
cls.model,
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
compare day-over-day against a rolling baseline.
|
compare day-over-day against a rolling baseline.
|
||||||
|
|
||||||
Env knobs:
|
Env knobs:
|
||||||
SGLANG_PRECISION_MODELS comma-separated model ids (default GLM-5.1-FP8)
|
SGLANG_PRECISION_MODELS comma-separated model ids (default GLM-5.2-FP8)
|
||||||
SGLANG_PRECISION_BASELINE_DIR local baseline dir
|
SGLANG_PRECISION_BASELINE_DIR local baseline dir
|
||||||
SGLANG_PRECISION_DIFF_THRESHOLD per-tensor rel_diff cutoff (default 1e-3)
|
SGLANG_PRECISION_DIFF_THRESHOLD per-tensor rel_diff cutoff (default 1e-3)
|
||||||
SGLANG_PRECISION_FORCE_UPDATE=1 skip comparison, refresh baseline
|
SGLANG_PRECISION_FORCE_UPDATE=1 skip comparison, refresh baseline
|
||||||
@@ -49,7 +49,7 @@ except Exception: # pragma: no cover
|
|||||||
|
|
||||||
register_cuda_ci(est_time=3600, suite="nightly-precision-8-gpu-h200", nightly=True)
|
register_cuda_ci(est_time=3600, suite="nightly-precision-8-gpu-h200", nightly=True)
|
||||||
|
|
||||||
DEFAULT_MODELS_FOR_NIGHTLY_PRECISION = "zai-org/GLM-5.1-FP8"
|
DEFAULT_MODELS_FOR_NIGHTLY_PRECISION = "zai-org/GLM-5.2-FP8"
|
||||||
DEFAULT_DIFF_THRESHOLD = 1e-3
|
DEFAULT_DIFF_THRESHOLD = 1e-3
|
||||||
# Fallback when the layer count can't be resolved: never silently shrink coverage.
|
# Fallback when the layer count can't be resolved: never silently shrink coverage.
|
||||||
DUMPER_FILTER_ALL_LAYERS = (
|
DUMPER_FILTER_ALL_LAYERS = (
|
||||||
|
|||||||
+5
-5
@@ -8,7 +8,7 @@ from sglang.test.test_utils import ModelLaunchSettings
|
|||||||
|
|
||||||
register_cuda_ci(est_time=7200, suite="nightly-4-gpu-gb300-glm5-nvfp4", nightly=True)
|
register_cuda_ci(est_time=7200, suite="nightly-4-gpu-gb300-glm5-nvfp4", nightly=True)
|
||||||
|
|
||||||
MODEL_PATH = "nvidia/GLM-5-NVFP4"
|
MODEL_PATH = "nvidia/GLM-5.2-NVFP4"
|
||||||
|
|
||||||
COMMON_ARGS = [
|
COMMON_ARGS = [
|
||||||
"--trust-remote-code",
|
"--trust-remote-code",
|
||||||
@@ -35,10 +35,10 @@ DP_MTP_ARGS = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
class TestGlm5Nvfp4(unittest.TestCase):
|
class TestGlm52Nvfp4(unittest.TestCase):
|
||||||
"""GLM-5 NVFP4 on GB300 (4x GB300 NVL4, tp=4)."""
|
"""GLM-5.2 NVFP4 on GB300 (4x GB300 NVL4, tp=4)."""
|
||||||
|
|
||||||
def test_glm5_nvfp4(self):
|
def test_glm52_nvfp4(self):
|
||||||
variants = [
|
variants = [
|
||||||
ModelLaunchSettings(
|
ModelLaunchSettings(
|
||||||
MODEL_PATH,
|
MODEL_PATH,
|
||||||
@@ -58,7 +58,7 @@ class TestGlm5Nvfp4(unittest.TestCase):
|
|||||||
|
|
||||||
run_combined_tests(
|
run_combined_tests(
|
||||||
models=variants,
|
models=variants,
|
||||||
test_name="GLM-5-NVFP4",
|
test_name="GLM-5.2-NVFP4",
|
||||||
accuracy_params=AccuracyTestParams(dataset="gsm8k", baseline_accuracy=0.92),
|
accuracy_params=AccuracyTestParams(dataset="gsm8k", baseline_accuracy=0.92),
|
||||||
performance_params=PerformanceTestParams(
|
performance_params=PerformanceTestParams(
|
||||||
profile_dir="performance_profiles_gb300",
|
profile_dir="performance_profiles_gb300",
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
import unittest
|
|
||||||
|
|
||||||
from sglang.test.accuracy_test_runner import AccuracyTestParams
|
|
||||||
from sglang.test.ci.ci_register import register_cuda_ci
|
|
||||||
from sglang.test.performance_test_runner import PerformanceTestParams
|
|
||||||
from sglang.test.run_combined_tests import run_combined_tests
|
|
||||||
from sglang.test.test_utils import ModelLaunchSettings
|
|
||||||
|
|
||||||
register_cuda_ci(
|
|
||||||
est_time=7200,
|
|
||||||
suite="nightly-4-gpu-gb300-glm5-fp8",
|
|
||||||
nightly=True,
|
|
||||||
disabled="not needed",
|
|
||||||
)
|
|
||||||
|
|
||||||
MODEL_PATH = "zai-org/GLM-5.1-FP8"
|
|
||||||
|
|
||||||
COMMON_ARGS = [
|
|
||||||
"--trust-remote-code",
|
|
||||||
"--reasoning-parser=glm45",
|
|
||||||
"--tool-call-parser=glm47",
|
|
||||||
"--mem-fraction-static=0.9",
|
|
||||||
"--enable-metrics",
|
|
||||||
]
|
|
||||||
|
|
||||||
MTP_ARGS = [
|
|
||||||
"--speculative-algorithm=EAGLE",
|
|
||||||
"--speculative-num-steps=3",
|
|
||||||
"--speculative-eagle-topk=1",
|
|
||||||
"--speculative-num-draft-tokens=4",
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
class TestGlm5Fp8(unittest.TestCase):
|
|
||||||
"""GLM-5.1 FP8 on GB300 (4x GB300 NVL4, tp=4)."""
|
|
||||||
|
|
||||||
def test_glm5_fp8(self):
|
|
||||||
variants = [
|
|
||||||
ModelLaunchSettings(
|
|
||||||
MODEL_PATH,
|
|
||||||
tp_size=4,
|
|
||||||
extra_args=COMMON_ARGS,
|
|
||||||
variant="TP4",
|
|
||||||
),
|
|
||||||
ModelLaunchSettings(
|
|
||||||
MODEL_PATH,
|
|
||||||
tp_size=4,
|
|
||||||
extra_args=COMMON_ARGS + ["--dp-size=4", "--enable-dp-attention"],
|
|
||||||
variant="TP4+DP4+DPA",
|
|
||||||
),
|
|
||||||
ModelLaunchSettings(
|
|
||||||
MODEL_PATH,
|
|
||||||
tp_size=4,
|
|
||||||
extra_args=COMMON_ARGS
|
|
||||||
+ ["--dp-size=4", "--enable-dp-attention"]
|
|
||||||
+ MTP_ARGS,
|
|
||||||
variant="TP4+DP4+DPA+MTP",
|
|
||||||
),
|
|
||||||
]
|
|
||||||
|
|
||||||
run_combined_tests(
|
|
||||||
models=variants,
|
|
||||||
test_name="GLM-5.1-FP8",
|
|
||||||
accuracy_params=AccuracyTestParams(dataset="gsm8k", baseline_accuracy=0.92),
|
|
||||||
performance_params=PerformanceTestParams(
|
|
||||||
profile_dir="performance_profiles_gb300",
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
unittest.main()
|
|
||||||
@@ -1,68 +0,0 @@
|
|||||||
import unittest
|
|
||||||
|
|
||||||
from sglang.test.ci.ci_register import register_cuda_ci
|
|
||||||
from sglang.test.kits.eval_accuracy_kit import GSM8KMixin
|
|
||||||
from sglang.test.send_one import BenchArgs, send_one_prompt
|
|
||||||
from sglang.test.server_fixtures.default_fixture import DefaultServerBase
|
|
||||||
from sglang.test.test_utils import is_in_ci, write_github_step_summary
|
|
||||||
|
|
||||||
register_cuda_ci(est_time=400, stage="base-c", runner_config="4-gpu-b200")
|
|
||||||
|
|
||||||
DSV32_FP4_MODEL = "nvidia/DeepSeek-V3.2-NVFP4"
|
|
||||||
|
|
||||||
|
|
||||||
class TestDeepseekV32FP4DPSpec(GSM8KMixin, DefaultServerBase):
|
|
||||||
model = DSV32_FP4_MODEL
|
|
||||||
timeout = 1200
|
|
||||||
other_args = [
|
|
||||||
"--tp",
|
|
||||||
"4",
|
|
||||||
"--dp",
|
|
||||||
"4",
|
|
||||||
"--enable-dp-attention",
|
|
||||||
"--attention-backend",
|
|
||||||
"dsa",
|
|
||||||
"--moe-runner-backend",
|
|
||||||
"flashinfer_trtllm",
|
|
||||||
"--quantization",
|
|
||||||
"modelopt_fp4",
|
|
||||||
"--tool-call-parser",
|
|
||||||
"deepseekv32",
|
|
||||||
"--reasoning-parser",
|
|
||||||
"deepseek-v3",
|
|
||||||
"--speculative-algorithm",
|
|
||||||
"EAGLE",
|
|
||||||
"--speculative-num-steps",
|
|
||||||
"3",
|
|
||||||
"--speculative-eagle-topk",
|
|
||||||
"1",
|
|
||||||
"--speculative-num-draft-tokens",
|
|
||||||
"4",
|
|
||||||
"--model-loader-extra-config",
|
|
||||||
'{"enable_multithread_load": true,"num_threads": 64}',
|
|
||||||
]
|
|
||||||
|
|
||||||
gsm8k_accuracy_thres = 0.93
|
|
||||||
gsm8k_num_questions = 500
|
|
||||||
gsm8k_num_threads = 500
|
|
||||||
gsm8k_num_shots = 20
|
|
||||||
gsm8k_accept_length_thres = 2.7
|
|
||||||
|
|
||||||
def test_z_bs_1_speed(self):
|
|
||||||
args = BenchArgs(port=int(self.base_url.split(":")[-1]), max_new_tokens=2048)
|
|
||||||
acc_length, speed = send_one_prompt(args)
|
|
||||||
|
|
||||||
print(f"{acc_length=:.2f} {speed=:.2f}")
|
|
||||||
|
|
||||||
if is_in_ci():
|
|
||||||
write_github_step_summary(
|
|
||||||
f"### test_bs_1_speed (deepseek-v32 mtp dp)\n"
|
|
||||||
f"{acc_length=:.2f}\n"
|
|
||||||
f"{speed=:.2f} token/s\n"
|
|
||||||
)
|
|
||||||
self.assertGreater(acc_length, 2.7)
|
|
||||||
self.assertGreater(speed, 90)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
unittest.main()
|
|
||||||
@@ -1,73 +0,0 @@
|
|||||||
import unittest
|
|
||||||
|
|
||||||
from sglang.test.ci.ci_register import register_cuda_ci
|
|
||||||
from sglang.test.kits.eval_accuracy_kit import GSM8KMixin
|
|
||||||
from sglang.test.send_one import BenchArgs, send_one_prompt
|
|
||||||
from sglang.test.server_fixtures.default_fixture import DefaultServerBase
|
|
||||||
from sglang.test.test_utils import is_in_ci, write_github_step_summary
|
|
||||||
|
|
||||||
register_cuda_ci(est_time=400, stage="base-c", runner_config="4-gpu-b200")
|
|
||||||
|
|
||||||
DSV32_FP4_MODEL = "nvidia/DeepSeek-V3.2-NVFP4"
|
|
||||||
|
|
||||||
|
|
||||||
class TestDeepseekV32FP4TPSpec(GSM8KMixin, DefaultServerBase):
|
|
||||||
model = DSV32_FP4_MODEL
|
|
||||||
timeout = 1200
|
|
||||||
other_args = [
|
|
||||||
"--tp",
|
|
||||||
"4",
|
|
||||||
"--attention-backend",
|
|
||||||
"dsa",
|
|
||||||
"--moe-runner-backend",
|
|
||||||
"flashinfer_trtllm",
|
|
||||||
"--quantization",
|
|
||||||
"modelopt_fp4",
|
|
||||||
"--tool-call-parser",
|
|
||||||
"deepseekv32",
|
|
||||||
"--reasoning-parser",
|
|
||||||
"deepseek-v3",
|
|
||||||
"--speculative-algorithm",
|
|
||||||
"EAGLE",
|
|
||||||
"--speculative-num-steps",
|
|
||||||
"3",
|
|
||||||
"--speculative-eagle-topk",
|
|
||||||
"1",
|
|
||||||
"--speculative-num-draft-tokens",
|
|
||||||
"4",
|
|
||||||
"--model-loader-extra-config",
|
|
||||||
'{"enable_multithread_load": true,"num_threads": 64}',
|
|
||||||
]
|
|
||||||
|
|
||||||
gsm8k_accuracy_thres = 0.93
|
|
||||||
gsm8k_num_questions = 500
|
|
||||||
gsm8k_num_threads = 500
|
|
||||||
gsm8k_num_shots = 20
|
|
||||||
gsm8k_accept_length_thres = 2.7
|
|
||||||
|
|
||||||
def test_z_bs_1_speed(self):
|
|
||||||
args = BenchArgs(
|
|
||||||
port=int(self.base_url.split(":")[-1]),
|
|
||||||
max_new_tokens=2048,
|
|
||||||
prompt=(
|
|
||||||
"Human: Think carefully before answering. Build a fully functional FastAPI todo server. "
|
|
||||||
"Start with a short design plan, then output the complete Python code, then show how to run it "
|
|
||||||
"and test three endpoints.\n\nAssistant:"
|
|
||||||
),
|
|
||||||
)
|
|
||||||
acc_length, speed = send_one_prompt(args)
|
|
||||||
|
|
||||||
print(f"{acc_length=:.2f} {speed=:.2f}")
|
|
||||||
|
|
||||||
if is_in_ci():
|
|
||||||
write_github_step_summary(
|
|
||||||
f"### test_bs_1_speed (deepseek-v32 mtp tp)\n"
|
|
||||||
f"{acc_length=:.2f}\n"
|
|
||||||
f"{speed=:.2f} token/s\n"
|
|
||||||
)
|
|
||||||
self.assertGreater(acc_length, 2.7)
|
|
||||||
self.assertGreater(speed, 150)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
unittest.main()
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
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=600,
|
|
||||||
stage="extra-b",
|
|
||||||
runner_config="8-gpu-h200",
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class TestDeepseekV32DPMTP(
|
|
||||||
DsaMtpServerBase, DsaMtpEvalConfigDefaults, GSM8KMixin, SpecDecodingMixin
|
|
||||||
):
|
|
||||||
model = "deepseek-ai/DeepSeek-V3.2"
|
|
||||||
mem_fraction_static = 0.85
|
|
||||||
enable_dp_attention = True
|
|
||||||
bs_1_speed_thres = 90
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
unittest.main()
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
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="extra-b",
|
|
||||||
runner_config="8-gpu-h200",
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class TestDeepseekV32TPMTP(
|
|
||||||
DsaMtpServerBase, DsaMtpEvalConfigDefaults, GSM8KMixin, SpecDecodingMixin
|
|
||||||
):
|
|
||||||
model = "deepseek-ai/DeepSeek-V3.2"
|
|
||||||
mem_fraction_static = 0.85
|
|
||||||
bs_1_speed_thres = 180
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
unittest.main()
|
|
||||||
+2
-2
@@ -15,10 +15,10 @@ register_cuda_ci(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class TestGLM5DPMTP(
|
class TestGLM52DPMTP(
|
||||||
DsaMtpServerBase, DsaMtpEvalConfigDefaults, GSM8KMixin, SpecDecodingMixin
|
DsaMtpServerBase, DsaMtpEvalConfigDefaults, GSM8KMixin, SpecDecodingMixin
|
||||||
):
|
):
|
||||||
model = "zai-org/GLM-5-FP8"
|
model = "zai-org/GLM-5.2-FP8"
|
||||||
mem_fraction_static = 0.88
|
mem_fraction_static = 0.88
|
||||||
enable_dp_attention = True
|
enable_dp_attention = True
|
||||||
bs_1_speed_thres = 70
|
bs_1_speed_thres = 70
|
||||||
+5
-5
@@ -9,18 +9,18 @@ from sglang.test.server_fixtures.default_fixture import DefaultServerBase
|
|||||||
|
|
||||||
register_cuda_ci(est_time=720, stage="extra-b", runner_config="8-gpu-h200")
|
register_cuda_ci(est_time=720, stage="extra-b", runner_config="8-gpu-h200")
|
||||||
|
|
||||||
GLM5_FP8_MODEL_PATH = "zai-org/GLM-5-FP8"
|
GLM52_FP8_MODEL_PATH = "zai-org/GLM-5.2-FP8"
|
||||||
|
|
||||||
|
|
||||||
class TestGLM5HiSparse(DefaultServerBase, GSM8KMixin):
|
class TestGLM52HiSparse(DefaultServerBase, GSM8KMixin):
|
||||||
"""GLM-5 FP8 with HiSparse (host-to-device sparse KV offload) on DSA decode.
|
"""GLM-5.2 FP8 with HiSparse (host-to-device sparse KV offload) on DSA decode.
|
||||||
|
|
||||||
HiSparse targets the high-concurrency regime and is not used together with
|
HiSparse targets the high-concurrency regime and is not used together with
|
||||||
EAGLE MTP, so this variant runs without speculative decoding (unlike the
|
EAGLE MTP, so this variant runs without speculative decoding (unlike the
|
||||||
DSA-MTP variants in test_dsa_glm5_{dp,tp}_mtp.py).
|
DSA-MTP variants in test_dsa_glm52_{dp,tp}_mtp.py).
|
||||||
"""
|
"""
|
||||||
|
|
||||||
model = GLM5_FP8_MODEL_PATH
|
model = GLM52_FP8_MODEL_PATH
|
||||||
other_args = [
|
other_args = [
|
||||||
"--trust-remote-code",
|
"--trust-remote-code",
|
||||||
"--tp",
|
"--tp",
|
||||||
+2
-2
@@ -15,10 +15,10 @@ register_cuda_ci(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class TestGLM5TPMTP(
|
class TestGLM52TPMTP(
|
||||||
DsaMtpServerBase, DsaMtpEvalConfigDefaults, GSM8KMixin, SpecDecodingMixin
|
DsaMtpServerBase, DsaMtpEvalConfigDefaults, GSM8KMixin, SpecDecodingMixin
|
||||||
):
|
):
|
||||||
model = "zai-org/GLM-5-FP8"
|
model = "zai-org/GLM-5.2-FP8"
|
||||||
mem_fraction_static = 0.8
|
mem_fraction_static = 0.8
|
||||||
bs_1_speed_thres = 150
|
bs_1_speed_thres = 150
|
||||||
|
|
||||||
+5
-5
@@ -23,7 +23,7 @@ from sglang.test.test_utils import (
|
|||||||
popen_launch_server,
|
popen_launch_server,
|
||||||
)
|
)
|
||||||
|
|
||||||
GLM5_MODEL = "zai-org/GLM-5.1-FP8"
|
GLM5_MODEL = "zai-org/GLM-5.2-FP8"
|
||||||
GLM5_LAUNCH_TIMEOUT = 3600
|
GLM5_LAUNCH_TIMEOUT = 3600
|
||||||
|
|
||||||
register_cuda_ci(est_time=900, suite="nightly-8-gpu-h200", nightly=True)
|
register_cuda_ci(est_time=900, suite="nightly-8-gpu-h200", nightly=True)
|
||||||
@@ -141,7 +141,7 @@ class AccuracyTwoPassMixin:
|
|||||||
|
|
||||||
|
|
||||||
class TestGLM5HiRadixCacheL3Accuracy(AccuracyTwoPassMixin, CustomTestCase):
|
class TestGLM5HiRadixCacheL3Accuracy(AccuracyTwoPassMixin, CustomTestCase):
|
||||||
"""GLM-5.1-FP8 + HiCache L3 (file backend), with HiRadixTree."""
|
"""GLM-5.2-FP8 + HiCache L3 (file backend), with HiRadixTree."""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
@@ -159,7 +159,7 @@ class TestGLM5HiRadixCacheL3Accuracy(AccuracyTwoPassMixin, CustomTestCase):
|
|||||||
"--page-size",
|
"--page-size",
|
||||||
"64",
|
"64",
|
||||||
"--mem-fraction-static",
|
"--mem-fraction-static",
|
||||||
"0.85",
|
"0.8",
|
||||||
"--model-loader-extra-config",
|
"--model-loader-extra-config",
|
||||||
'{"enable_multithread_load": true, "num_threads": 64}',
|
'{"enable_multithread_load": true, "num_threads": 64}',
|
||||||
"--enable-hierarchical-cache",
|
"--enable-hierarchical-cache",
|
||||||
@@ -189,7 +189,7 @@ class TestGLM5HiRadixCacheL3Accuracy(AccuracyTwoPassMixin, CustomTestCase):
|
|||||||
|
|
||||||
|
|
||||||
class TestGLM5UnifiedRadixCacheL3Accuracy(AccuracyTwoPassMixin, CustomTestCase):
|
class TestGLM5UnifiedRadixCacheL3Accuracy(AccuracyTwoPassMixin, CustomTestCase):
|
||||||
"""GLM-5.1-FP8 + HiCache L3 (file backend), with UnifiedRadixTree."""
|
"""GLM-5.2-FP8 + HiCache L3 (file backend), with UnifiedRadixTree."""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
@@ -207,7 +207,7 @@ class TestGLM5UnifiedRadixCacheL3Accuracy(AccuracyTwoPassMixin, CustomTestCase):
|
|||||||
"--page-size",
|
"--page-size",
|
||||||
"64",
|
"64",
|
||||||
"--mem-fraction-static",
|
"--mem-fraction-static",
|
||||||
"0.85",
|
"0.8",
|
||||||
"--model-loader-extra-config",
|
"--model-loader-extra-config",
|
||||||
'{"enable_multithread_load": true, "num_threads": 64}',
|
'{"enable_multithread_load": true, "num_threads": 64}',
|
||||||
"--enable-hierarchical-cache",
|
"--enable-hierarchical-cache",
|
||||||
|
|||||||
@@ -131,7 +131,6 @@ NIGHTLY_SUITES = {
|
|||||||
# GB300 (4x GB300 NVL4) nightly suites
|
# GB300 (4x GB300 NVL4) nightly suites
|
||||||
"nightly-4-gpu-gb300",
|
"nightly-4-gpu-gb300",
|
||||||
"nightly-4-gpu-gb300-deepseek-v4-pro-fp4",
|
"nightly-4-gpu-gb300-deepseek-v4-pro-fp4",
|
||||||
"nightly-4-gpu-gb300-glm5-fp8",
|
|
||||||
"nightly-4-gpu-gb300-glm5-nvfp4",
|
"nightly-4-gpu-gb300-glm5-nvfp4",
|
||||||
"nightly-4-gpu-gb300-kimi-k25",
|
"nightly-4-gpu-gb300-kimi-k25",
|
||||||
"nightly-4-gpu-gb300-kimi-k25-nvfp4",
|
"nightly-4-gpu-gb300-kimi-k25-nvfp4",
|
||||||
|
|||||||
Reference in New Issue
Block a user