[DSv4] Loading Time Weight Dequant (#27867)

Co-authored-by: Peng Zhang <aniz1905@gmail.com>
This commit is contained in:
laixin
2026-07-07 09:54:34 +08:00
committed by GitHub
co-authored by Peng Zhang
parent 3cbb7568bd
commit 6279805962
5 changed files with 148 additions and 3 deletions
@@ -4,7 +4,10 @@ Launches TP=4 with Marlin FP4 MoE runner + EAGLE speculative decoding.
Runs 12 ServerSanity probes (correctness, streaming, concurrency, determinism)
plus a GSM8K accuracy gate.
Registry: base-c-test-deepep-8-gpu-h200 (per-commit, 8x H200 — only 4 used by TP=4)
Also covers SGLANG_DSV4_FP4_DEQUANT=1 (TP=8): FP4 experts dequantized to FP8
during loading and served through the plain FP8 MoE path.
Registry: base-c-test-deepep-8-gpu-h200 (per-commit, 8x H200)
"""
import unittest
@@ -21,7 +24,7 @@ from sglang.test.test_utils import (
try_cached_model,
)
register_cuda_ci(est_time=370, stage="base-c", runner_config="deepep-8-gpu-h200")
register_cuda_ci(est_time=600, stage="base-c", runner_config="deepep-8-gpu-h200")
def _flashinfer_has_sm90_cutlass_mxfp4() -> bool:
@@ -170,5 +173,45 @@ class TestDSV4FlashFP4NonMTPH200(
kill_process_tree(cls.process.pid)
class TestDSV4FlashFP4DequantTP8H200(
BasicDecodeCorrectnessMixin, GSM8KMixin, CustomTestCase
):
"""SGLANG_DSV4_FP4_DEQUANT=1: TP=8, FP4 experts dequantized to FP8 during
loading, then served through the plain FP8 MoE path (no mxfp4 runner)."""
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",
"8",
"--speculative-algorithm",
"EAGLE",
"--speculative-num-steps",
"3",
"--speculative-eagle-topk",
"1",
"--speculative-num-draft-tokens",
"4",
"--watchdog-timeout",
"900",
],
env={"SGLANG_DSV4_FP4_DEQUANT": "1"},
)
@classmethod
def tearDownClass(cls):
if hasattr(cls, "process") and cls.process:
kill_process_tree(cls.process.pid)
if __name__ == "__main__":
unittest.main()