diff --git a/test/registered/cp/test_deepseek_v4_flash_fp4_b200_cp.py b/test/registered/cp/test_deepseek_v4_flash_fp4_b200_cp.py index 34a008401e..41e70bc7c9 100644 --- a/test/registered/cp/test_deepseek_v4_flash_fp4_b200_cp.py +++ b/test/registered/cp/test_deepseek_v4_flash_fp4_b200_cp.py @@ -14,7 +14,6 @@ from sglang.srt.utils import kill_process_tree from sglang.test.ci.ci_register import register_cuda_ci from sglang.test.kits.basic_decode_correctness_kit import BasicDecodeCorrectnessMixin from sglang.test.kits.eval_accuracy_kit import GSM8KMixin -from sglang.test.kits.spec_decoding_kit import SpecDecodingMixin from sglang.test.test_utils import ( DEFAULT_URL_FOR_TEST, CustomTestCase, @@ -26,75 +25,14 @@ register_cuda_ci(est_time=689, stage="extra-b", runner_config="4-gpu-b200") MODEL = "deepseek-ai/DeepSeek-V4-Flash" SERVER_LAUNCH_TIMEOUT = 3600 +DSPARK_MODEL = "deepseek-ai/DeepSeek-V4-Flash-DSpark" DEEPEP_CONFIG = '{"normal_dispatch":{"num_sms":96},"normal_combine":{"num_sms":96}}' -_DEEPEP_ENV = { - "SGLANG_DEEPEP_NUM_MAX_DISPATCH_TOKENS_PER_RANK": "1024", - # The draft-extend graph pool costs ~4.5 GB here (DeepEP MoE workspace is - # captured at full dispatch capacity), which starves the eager prefill - # draft extend and OOMs. Run draft extend eager until the capture-time - # footprint is fixed. - "SGLANG_DISABLE_DRAFT_EXTEND_CUDA_GRAPH": "1", -} - _MEGAMOE_ENV = { "SGLANG_OPT_DEEPGEMM_MEGA_MOE_NUM_MAX_TOKENS_PER_RANK": "8320", } -class TestDSV4FlashFP4B200Balanced_CP_DeepEP( - SpecDecodingMixin, - BasicDecodeCorrectnessMixin, - GSM8KMixin, - CustomTestCase, -): - """Balanced recipe: TP=4, DP=4, DeepEP, EAGLE (1-step spec).""" - - gsm8k_accuracy_thres = 0.93 - accept_length_thres = 1.8 - bs_1_speed_thres = 100 - - @classmethod - def setUpClass(cls): - cls.model = try_cached_model(MODEL) - cls.base_url = DEFAULT_URL_FOR_TEST - cls.process = popen_launch_server( - cls.model, - cls.base_url, - timeout=SERVER_LAUNCH_TIMEOUT, - other_args=[ - "--trust-remote-code", - "--tp", - "4", - "--attn-cp-size", - "4", - "--moe-a2a-backend", - "deepep", - "--speculative-algorithm", - "EAGLE", - "--speculative-num-steps", - "1", - "--speculative-eagle-topk", - "1", - "--speculative-num-draft-tokens", - "2", - "--enable-prefill-cp", - "--cp-strategy", - "interleave", - "--deepep-config", - DEEPEP_CONFIG, - "--mem-fraction-static", - "0.80", - ], - env=_DEEPEP_ENV, - ) - - @classmethod - def tearDownClass(cls): - if hasattr(cls, "process") and cls.process: - kill_process_tree(cls.process.pid) - - class TestDSV4FlashFP4B200Balanced_CP_Megamoe( BasicDecodeCorrectnessMixin, GSM8KMixin, @@ -144,58 +82,6 @@ class TestDSV4FlashFP4B200Balanced_CP_Megamoe( kill_process_tree(cls.process.pid) -class TestDSV4FlashFP4B200Balanced_CP_NonDeepEP( - SpecDecodingMixin, - BasicDecodeCorrectnessMixin, - GSM8KMixin, - CustomTestCase, -): - """Balanced recipe: TP=4, DP=4, EAGLE (1-step spec).""" - - gsm8k_accuracy_thres = 0.93 - accept_length_thres = 1.8 - bs_1_speed_thres = 100 - - @classmethod - def setUpClass(cls): - cls.model = try_cached_model(MODEL) - cls.base_url = DEFAULT_URL_FOR_TEST - cls.process = popen_launch_server( - cls.model, - cls.base_url, - timeout=SERVER_LAUNCH_TIMEOUT, - other_args=[ - "--trust-remote-code", - "--tp", - "4", - "--attn-cp-size", - "4", - "--speculative-algorithm", - "EAGLE", - "--speculative-num-steps", - "1", - "--speculative-eagle-topk", - "1", - "--speculative-num-draft-tokens", - "2", - "--enable-prefill-cp", - "--cp-strategy", - "interleave", - "--moe-runner-backend", # for fp4 checkpoint - "flashinfer_mxfp4", - ], - ) - - @classmethod - def tearDownClass(cls): - if hasattr(cls, "process") and cls.process: - kill_process_tree(cls.process.pid) - - -# DSPARK draft is bundled with the -DSpark checkpoint. -DSPARK_MODEL = "deepseek-ai/DeepSeek-V4-Flash-DSpark" - - class TestDSV4FlashFP4B200_CP_DSpark( BasicDecodeCorrectnessMixin, GSM8KMixin, diff --git a/test/registered/e2e/models/test_deepseek_v4_flash_fp4_b200.py b/test/registered/e2e/models/test_deepseek_v4_flash_fp4_b200.py index 742ecfdff8..934922d300 100644 --- a/test/registered/e2e/models/test_deepseek_v4_flash_fp4_b200.py +++ b/test/registered/e2e/models/test_deepseek_v4_flash_fp4_b200.py @@ -34,50 +34,6 @@ _DEEPEP_ENV = { } -class TestDSV4FlashFP4B200MTP( - SpecDecodingMixin, - BasicDecodeCorrectnessMixin, - GSM8KMixin, - CustomTestCase, -): - """LowLatency recipe: TP=4, FP4 (mxfp4), EAGLE spec decoding.""" - - gsm8k_accuracy_thres = 0.93 - accept_length_thres = 2.8 - bs_1_speed_thres = 220 - - @classmethod - def setUpClass(cls): - cls.model = try_cached_model(MTP_MODEL) - cls.base_url = DEFAULT_URL_FOR_TEST - cls.process = popen_launch_server( - cls.model, - cls.base_url, - timeout=SERVER_LAUNCH_TIMEOUT, - other_args=[ - "--trust-remote-code", - "--tp", - "4", - "--speculative-algorithm", - "EAGLE", - "--speculative-num-steps", - "3", - "--speculative-eagle-topk", - "1", - "--speculative-num-draft-tokens", - "4", - "--chunked-prefill-size", - "4096", - "--disable-flashinfer-autotune", - ], - ) - - @classmethod - def tearDownClass(cls): - if hasattr(cls, "process") and cls.process: - kill_process_tree(cls.process.pid) - - class TestDSV4FlashFP4B200DSpark( SpecDecodingMixin, BasicDecodeCorrectnessMixin, diff --git a/test/registered/e2e/models/test_deepseek_v4_flash_fp4_b200_trtllm.py b/test/registered/e2e/models/test_deepseek_v4_flash_fp4_b200_trtllm.py index ffa620c113..b3880bc5fc 100644 --- a/test/registered/e2e/models/test_deepseek_v4_flash_fp4_b200_trtllm.py +++ b/test/registered/e2e/models/test_deepseek_v4_flash_fp4_b200_trtllm.py @@ -12,7 +12,6 @@ from sglang.srt.utils import kill_process_tree from sglang.test.ci.ci_register import register_cuda_ci from sglang.test.kits.basic_decode_correctness_kit import BasicDecodeCorrectnessMixin from sglang.test.kits.eval_accuracy_kit import GSM8KMixin -from sglang.test.kits.spec_decoding_kit import SpecDecodingMixin from sglang.test.test_utils import ( DEFAULT_URL_FOR_TEST, CustomTestCase, @@ -31,76 +30,6 @@ _DEEPEP_ENV = { } -class TestDSV4FlashFP4B200Trtllm( - SpecDecodingMixin, - BasicDecodeCorrectnessMixin, - GSM8KMixin, - CustomTestCase, -): - """LowLatency recipe: TP=4, FP4 (mxfp4), EAGLE spec decoding.""" - - gsm8k_accuracy_thres = 0.93 - accept_length_thres = 2.8 - bs_1_speed_thres = 220 - # Arbitrary distinctive digits; only needs to survive tokenization intact. - NEEDLE = "48173" - - @classmethod - def setUpClass(cls): - cls.model = try_cached_model(MODEL) - cls.base_url = DEFAULT_URL_FOR_TEST - cls.process = popen_launch_server( - cls.model, - cls.base_url, - timeout=SERVER_LAUNCH_TIMEOUT, - other_args=[ - "--trust-remote-code", - "--dsv4-attn-backend", - "trtllm", - "--tp", - "4", - "--moe-runner-backend", - "flashinfer_mxfp4", - "--speculative-algorithm", - "EAGLE", - "--speculative-num-steps", - "3", - "--speculative-eagle-topk", - "1", - "--speculative-num-draft-tokens", - "4", - "--chunked-prefill-size", - "4096", - "--disable-flashinfer-autotune", - ], - ) - - @classmethod - def tearDownClass(cls): - if hasattr(cls, "process") and cls.process: - kill_process_tree(cls.process.pid) - - def test_long_prompt_chunked_prefill_recall(self): - # The needle sits in the first chunk and the question in the last, so - # only a correct multi-chunk _forward_trtllm_prefill can recall it. - filler = ( - "The expedition recorded water temperature, salinity, and current " - "speed at every station along the transect. " - ) - prompt = ( - f"The station beacon identifier is {self.NEEDLE}.\n\n" - + "".join(f"[Entry {i}] {filler}" for i in range(220)) - + "\n\nQ: What is the station beacon identifier? Reply with just " - "the number.\nA:" - ) - # Second pass extends from the radix-cached prefix instead of prefilling it. - for label in ("cold", "cached-prefix"): - out = self._decode_generate( - prompt=prompt, max_new_tokens=self.sanity_max_new_tokens_short - ) - self.assertIn(self.NEEDLE, out, f"{label}: {out!r}") - - class TestDSV4FlashFP4BreakableCudaGraphB200Trtllm( BasicDecodeCorrectnessMixin, GSM8KMixin, CustomTestCase ): diff --git a/test/registered/e2e/models/test_deepseek_v4_flash_fp4_h200.py b/test/registered/e2e/models/test_deepseek_v4_flash_fp4_h200.py index ffb70aed07..d92f30d063 100644 --- a/test/registered/e2e/models/test_deepseek_v4_flash_fp4_h200.py +++ b/test/registered/e2e/models/test_deepseek_v4_flash_fp4_h200.py @@ -44,51 +44,6 @@ SERVER_LAUNCH_TIMEOUT = 3600 DEEPEP_CONFIG = '{"normal_dispatch":{"num_sms":96},"normal_combine":{"num_sms":96}}' -class TestDSV4FlashFP4H200( - SpecDecodingMixin, - BasicDecodeCorrectnessMixin, - GSM8KMixin, - CustomTestCase, -): - """LowLatency recipe: TP=4, Marlin FP4, EAGLE spec decoding.""" - - gsm8k_accuracy_thres = 0.93 - accept_length_thres = 2.8 - bs_1_speed_thres = 240 - - @classmethod - def setUpClass(cls): - cls.model = try_cached_model(MODEL) - cls.base_url = DEFAULT_URL_FOR_TEST - cls.process = popen_launch_server( - cls.model, - cls.base_url, - timeout=SERVER_LAUNCH_TIMEOUT, - other_args=[ - "--trust-remote-code", - "--tp", - "4", - "--moe-runner-backend", - "marlin", - "--speculative-algorithm", - "EAGLE", - "--speculative-num-steps", - "3", - "--speculative-eagle-topk", - "1", - "--speculative-num-draft-tokens", - "4", - "--watchdog-timeout", - "900", - ], - ) - - @classmethod - def tearDownClass(cls): - if hasattr(cls, "process") and cls.process: - kill_process_tree(cls.process.pid) - - @unittest.skipUnless( _flashinfer_has_sm90_cutlass_mxfp4(), "FlashInfer build lacks SM90 mixed-input MXFP4 helpers (PR #3084, >= 0.6.11)", @@ -141,38 +96,6 @@ class TestDSV4FlashFP4H200FlashInferCutlass( kill_process_tree(cls.process.pid) -class TestDSV4FlashFP4NonMTPH200( - BasicDecodeCorrectnessMixin, GSM8KMixin, CustomTestCase -): - """LowLatency recipe without MTP: TP=4, Marlin FP4, no speculative decoding.""" - - gsm8k_accuracy_thres = 0.93 - - @classmethod - def setUpClass(cls): - cls.model = try_cached_model(MODEL) - cls.base_url = DEFAULT_URL_FOR_TEST - cls.process = popen_launch_server( - cls.model, - cls.base_url, - timeout=SERVER_LAUNCH_TIMEOUT, - other_args=[ - "--trust-remote-code", - "--tp", - "4", - "--moe-runner-backend", - "marlin", - "--watchdog-timeout", - "900", - ], - ) - - @classmethod - def tearDownClass(cls): - if hasattr(cls, "process") and cls.process: - kill_process_tree(cls.process.pid) - - class TestDSV4FlashFP4DequantTP8H200( BasicDecodeCorrectnessMixin, GSM8KMixin, CustomTestCase ): diff --git a/test/registered/e2e/models/test_deepseek_v4_flash_fp8_h200.py b/test/registered/e2e/models/test_deepseek_v4_flash_fp8_h200.py deleted file mode 100644 index 3e0b5a03e0..0000000000 --- a/test/registered/e2e/models/test_deepseek_v4_flash_fp8_h200.py +++ /dev/null @@ -1,158 +0,0 @@ -"""H200 per-commit CI: DeepSeek-V4-Flash FP8 (LowLatency recipe). - -Launches TP=4 with DeepEP a2a backend + EAGLE speculative decoding, -with FP4 experts disabled via SGLANG_DSV4_FP4_EXPERTS=0. -Runs 12 ServerSanity probes (correctness, streaming, concurrency, determinism) -plus a GSM8K accuracy gate. - -Registry: extra-b-test-8-gpu-h200 (label-gated, 8x H200 — only 4 used by TP=4) -""" - -import unittest - -from sglang.srt.utils import kill_process_tree -from sglang.test.ci.ci_register import register_cuda_ci -from sglang.test.kits.basic_decode_correctness_kit import BasicDecodeCorrectnessMixin -from sglang.test.kits.eval_accuracy_kit import GSM8KMixin -from sglang.test.kits.spec_decoding_kit import SpecDecodingMixin -from sglang.test.test_utils import ( - DEFAULT_URL_FOR_TEST, - CustomTestCase, - popen_launch_server, - try_cached_model, -) - -register_cuda_ci(est_time=294, stage="extra-b", runner_config="8-gpu-h200") - -MODEL_FP8 = "sgl-project/DeepSeek-V4-Flash-FP8" -SERVER_LAUNCH_TIMEOUT = 3600 -DEEPEP_CONFIG = '{"normal_dispatch":{"num_sms":96},"normal_combine":{"num_sms":96}}' - - -class TestDSV4FlashFP8H200( - SpecDecodingMixin, - BasicDecodeCorrectnessMixin, - GSM8KMixin, - CustomTestCase, -): - """LowLatency recipe: TP=4, Marlin FP4, EAGLE spec decoding.""" - - gsm8k_accuracy_thres = 0.93 - accept_length_thres = 1.8 - bs_1_speed_thres = 140 - - @classmethod - def setUpClass(cls): - cls.model = try_cached_model(MODEL_FP8) - cls.base_url = DEFAULT_URL_FOR_TEST - cls.process = popen_launch_server( - cls.model, - cls.base_url, - timeout=SERVER_LAUNCH_TIMEOUT, - other_args=[ - "--trust-remote-code", - "--tp", - "4", - "--attn-dp-size", - "4", - "--moe-a2a-backend", - "deepep", - "--speculative-algorithm", - "EAGLE", - "--speculative-num-steps", - "1", - "--speculative-eagle-topk", - "1", - "--speculative-num-draft-tokens", - "2", - "--cuda-graph-max-bs-decode", - "128", - "--max-running-requests", - "128", - "--deepep-config", - DEEPEP_CONFIG, - "--watchdog-timeout", - "900", - ], - env={ - "SGLANG_DSV4_FP4_EXPERTS": "0", - "SGLANG_DEEPEP_NUM_MAX_DISPATCH_TOKENS_PER_RANK": "256", - }, - ) - - @classmethod - def tearDownClass(cls): - if hasattr(cls, "process") and cls.process: - kill_process_tree(cls.process.pid) - - -class TestDSV4FlashFP8H200MegaMoE( - SpecDecodingMixin, - BasicDecodeCorrectnessMixin, - GSM8KMixin, - CustomTestCase, -): - """SM90 FP8 MegaMoE recipe: same 4-GPU split (TP=4) + EAGLE spec decoding - as the recipe above, but routes MoE through the SM90 all-FP8 MegaMoE path - (DeepEP a2a + DeepGEMM ``deep_gemm`` runner + the ``SGLANG_OPT_*`` flags). - """ - - gsm8k_accuracy_thres = 0.93 - accept_length_thres = 1.8 - bs_1_speed_thres = 140 - - @classmethod - def setUpClass(cls): - cls.model = try_cached_model(MODEL_FP8) - cls.base_url = DEFAULT_URL_FOR_TEST - cls.process = popen_launch_server( - cls.model, - cls.base_url, - timeout=SERVER_LAUNCH_TIMEOUT, - other_args=[ - "--trust-remote-code", - "--tp", - "4", - "--attn-dp-size", - "4", - "--moe-a2a-backend", - "deepep", - "--moe-runner-backend", - "deep_gemm", - "--speculative-algorithm", - "EAGLE", - "--speculative-num-steps", - "1", - "--speculative-eagle-topk", - "1", - "--speculative-num-draft-tokens", - "2", - "--chunked-prefill-size", - "8192", - "--cuda-graph-max-bs-decode", - "128", - "--max-running-requests", - "128", - "--watchdog-timeout", - "900", - ], - env={ - "SGLANG_DSV4_FP4_EXPERTS": "0", - # INVARIANT: this per-rank cap MUST equal - # chunked_prefill_size / attn_dp_size (= 8192 / 4 = 2048), the - # per-rank prefill bound under attention DP. If you change - # --chunked-prefill-size or --attn-dp-size above, update this - # to match — otherwise MegaMoE falls back whenever a prefill - # chunk exceeds it. - "SGLANG_OPT_DEEPGEMM_MEGA_MOE_NUM_MAX_TOKENS_PER_RANK": "2048", - }, - ) - - @classmethod - def tearDownClass(cls): - if hasattr(cls, "process") and cls.process: - kill_process_tree(cls.process.pid) - - -if __name__ == "__main__": - unittest.main() diff --git a/test/registered/gb300/test_deepseek_v4_pro_fp4_balanced.py b/test/registered/gb300/test_deepseek_v4_pro_fp4_balanced.py deleted file mode 100644 index be1cfe563b..0000000000 --- a/test/registered/gb300/test_deepseek_v4_pro_fp4_balanced.py +++ /dev/null @@ -1,77 +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.gb300_utils import GB300_NCCL_PORT -from sglang.test.performance_test_runner import PerformanceTestParams -from sglang.test.run_combined_tests import run_combined_tests -from sglang.test.test_utils import CustomTestCase, ModelLaunchSettings - -register_cuda_ci(est_time=600, stage="nightly", runner_config="4-gpu-gb300") - -MODEL_PATH = "deepseek-ai/DeepSeek-V4-Pro" -SERVER_LAUNCH_TIMEOUT = 3600 -DEEPEP_CONFIG = '{"normal_dispatch":{"num_sms":96},"normal_combine":{"num_sms":96}}' - -BALANCED_ARGS = [ - "--trust-remote-code", - "--attn-dp-size", - "4", - "--moe-a2a-backend", - "deepep", - "--speculative-algorithm", - "EAGLE", - "--speculative-num-steps", - "1", - "--speculative-eagle-topk", - "1", - "--speculative-num-draft-tokens", - "2", - "--mem-fraction-static", - "0.85", - "--cuda-graph-max-bs-decode", - "128", - "--max-running-requests", - "256", - "--deepep-config", - DEEPEP_CONFIG, - "--nccl-port", - GB300_NCCL_PORT, -] - -BALANCED_ENV = { - "SGLANG_DEEPEP_NUM_MAX_DISPATCH_TOKENS_PER_RANK": "256", -} - - -class TestDeepSeekV4ProFp4Balanced(CustomTestCase): - """DeepSeek-V4-Pro FP4 balanced config on GB300.""" - - def test_deepseek_v4_pro_fp4_balanced(self): - run_combined_tests( - models=[ - ModelLaunchSettings( - MODEL_PATH, - tp_size=4, - extra_args=BALANCED_ARGS, - env=BALANCED_ENV, - variant="balanced", - launch_timeout=SERVER_LAUNCH_TIMEOUT, - ) - ], - test_name="DeepSeek-V4-Pro-FP4 (balanced)", - accuracy_params=AccuracyTestParams( - dataset="gsm8k", - baseline_accuracy=0.935, - temperature=1.0, - top_p=1.0, - ), - performance_params=PerformanceTestParams( - batch_sizes=[64], - result_dir="performance_results_gb300", - ), - ) - - -if __name__ == "__main__": - unittest.main() diff --git a/test/registered/gb300/test_deepseek_v4_pro_fp4_high_throughput.py b/test/registered/gb300/test_deepseek_v4_pro_fp4_high_throughput.py deleted file mode 100644 index e154f39cbf..0000000000 --- a/test/registered/gb300/test_deepseek_v4_pro_fp4_high_throughput.py +++ /dev/null @@ -1,66 +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.gb300_utils import GB300_NCCL_PORT -from sglang.test.performance_test_runner import PerformanceTestParams -from sglang.test.run_combined_tests import run_combined_tests -from sglang.test.test_utils import CustomTestCase, ModelLaunchSettings - -register_cuda_ci(est_time=600, stage="nightly", runner_config="4-gpu-gb300") - -MODEL_PATH = "deepseek-ai/DeepSeek-V4-Pro" -SERVER_LAUNCH_TIMEOUT = 3600 - -HIGH_THROUGHPUT_ARGS = [ - "--trust-remote-code", - "--attn-dp-size", - "4", - "--moe-a2a-backend", - "megamoe", - "--mem-fraction-static", - "0.9", - "--cuda-graph-max-bs-decode", - "128", - "--max-running-requests", - "256", - "--nccl-port", - GB300_NCCL_PORT, -] - -HIGH_THROUGHPUT_ENV = { - "SGLANG_OPT_DEEPGEMM_MEGA_MOE_NUM_MAX_TOKENS_PER_RANK": "8320", -} - - -class TestDeepSeekV4ProFp4HighThroughput(CustomTestCase): - """DeepSeek-V4-Pro FP4 high-throughput config on GB300.""" - - def test_deepseek_v4_pro_fp4_high_throughput(self): - run_combined_tests( - models=[ - ModelLaunchSettings( - MODEL_PATH, - tp_size=4, - extra_args=HIGH_THROUGHPUT_ARGS, - env=HIGH_THROUGHPUT_ENV, - variant="high-throughput", - launch_timeout=SERVER_LAUNCH_TIMEOUT, - ) - ], - test_name="DeepSeek-V4-Pro-FP4 (high-throughput)", - accuracy_params=AccuracyTestParams( - dataset="gsm8k", - baseline_accuracy=0.935, - temperature=1.0, - top_p=1.0, - ), - performance_params=PerformanceTestParams( - batch_sizes=[128], - result_dir="performance_results_gb300", - ), - ) - - -if __name__ == "__main__": - unittest.main() diff --git a/test/registered/gb300/test_deepseek_v4_pro_fp4_low_latency.py b/test/registered/gb300/test_deepseek_v4_pro_fp4_low_latency.py deleted file mode 100644 index 65e010b7d1..0000000000 --- a/test/registered/gb300/test_deepseek_v4_pro_fp4_low_latency.py +++ /dev/null @@ -1,68 +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.gb300_utils import GB300_NCCL_PORT -from sglang.test.performance_test_runner import PerformanceTestParams -from sglang.test.run_combined_tests import run_combined_tests -from sglang.test.test_utils import CustomTestCase, ModelLaunchSettings - -register_cuda_ci(est_time=720, stage="nightly", runner_config="4-gpu-gb300") - -MODEL_PATH = "deepseek-ai/DeepSeek-V4-Pro" -SERVER_LAUNCH_TIMEOUT = 3600 - -LOW_LATENCY_ARGS = [ - "--trust-remote-code", - "--moe-runner-backend", - "flashinfer_mxfp4", - "--speculative-algorithm", - "EAGLE", - "--speculative-num-steps", - "3", - "--speculative-eagle-topk", - "1", - "--speculative-num-draft-tokens", - "4", - "--chunked-prefill-size", - "8192", - "--disable-flashinfer-autotune", - "--swa-full-tokens-ratio", - "0.1", - "--mem-fraction-static", - "0.85", - "--nccl-port", - GB300_NCCL_PORT, -] - - -class TestDeepSeekV4ProFp4LowLatency(CustomTestCase): - """DeepSeek-V4-Pro FP4 low-latency config on GB300.""" - - def test_deepseek_v4_pro_fp4_low_latency(self): - run_combined_tests( - models=[ - ModelLaunchSettings( - MODEL_PATH, - tp_size=4, - extra_args=LOW_LATENCY_ARGS, - variant="low-latency", - launch_timeout=SERVER_LAUNCH_TIMEOUT, - ) - ], - test_name="DeepSeek-V4-Pro-FP4 (low-latency)", - accuracy_params=AccuracyTestParams( - dataset="gsm8k", - baseline_accuracy=0.935, - temperature=1.0, - top_p=1.0, - ), - performance_params=PerformanceTestParams( - batch_sizes=[1, 4, 16], - result_dir="performance_results_gb300", - ), - ) - - -if __name__ == "__main__": - unittest.main()