[Spec] Retire Spec V1 (#27964)
This commit is contained in:
@@ -23,7 +23,6 @@ from sglang.test.test_utils import (
|
||||
DSV4_FLASH_MODEL_PATH = "sgl-project/DeepSeek-V4-Flash-FP8"
|
||||
|
||||
DSV4_FLASH_BASE_ENV = {
|
||||
"SGLANG_ENABLE_SPEC_V2": "1",
|
||||
"SGLANG_DSV4_FP4_EXPERTS": "0",
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,6 @@ HONGLOUMENG_PATH = os.environ.get(
|
||||
)
|
||||
|
||||
DSV4_PRO_BASE_ENV = {
|
||||
"SGLANG_ENABLE_SPEC_V2": "1",
|
||||
"SGLANG_OPT_USE_CUSTOM_ALL_REDUCE_V2": "1",
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,6 @@ class TestGlm51Fp8(unittest.TestCase):
|
||||
tp_size=8,
|
||||
extra_args=COMMON_ARGS + dp_args + MTP_ARGS,
|
||||
variant="TP8+DP8+MTP",
|
||||
env={"SGLANG_ENABLE_SPEC_V2": "1"},
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
@@ -469,6 +469,7 @@ class TestMTPwithTBOLowLatency(CustomTestCase):
|
||||
"--deepep-mode",
|
||||
"low_latency",
|
||||
"--enable-two-batch-overlap",
|
||||
"--disable-overlap-schedule",
|
||||
]
|
||||
)
|
||||
|
||||
@@ -476,7 +477,6 @@ class TestMTPwithTBOLowLatency(CustomTestCase):
|
||||
env["SGLANG_USE_AITER"] = "1"
|
||||
env["SGLANG_MORI_DISPATCH_DTYPE"] = "bf16"
|
||||
env["SGLANG_MORI_NUM_MAX_DISPATCH_TOKENS_PER_RANK"] = "128"
|
||||
env["SGLANG_ENABLE_SPEC_V2"] = "false"
|
||||
env["MORI_SHMEM_MODE"] = "ISOLATION" # avoid out of symmetric heap memory
|
||||
# FIXME(billishyahao): enable p2p due to no rdma devices on CI machine
|
||||
# env["MORI_DISABLE_P2P"] = "1"
|
||||
@@ -534,6 +534,7 @@ class TestEPLBMoriStat(CustomTestCase):
|
||||
"normal",
|
||||
"--expert-distribution-recorder-mode",
|
||||
"stat",
|
||||
"--disable-overlap-schedule",
|
||||
]
|
||||
)
|
||||
|
||||
@@ -541,7 +542,6 @@ class TestEPLBMoriStat(CustomTestCase):
|
||||
env["SGLANG_USE_AITER"] = "1"
|
||||
env["SGLANG_MORI_DISPATCH_DTYPE"] = "bf16"
|
||||
env["SGLANG_MORI_NUM_MAX_DISPATCH_TOKENS_PER_RANK"] = "128"
|
||||
env["SGLANG_ENABLE_SPEC_V2"] = "false"
|
||||
env["SGLANG_EPLB_ROCM_P2P_BATCH_CHUNK_SIZE"] = "32"
|
||||
env["MORI_SHMEM_MODE"] = "ISOLATION" # avoid out of symmetric heap memory
|
||||
# FIXME(billishyahao): enable p2p due to no rdma devices on CI machine
|
||||
|
||||
@@ -3,7 +3,6 @@ from types import SimpleNamespace
|
||||
|
||||
import requests
|
||||
|
||||
from sglang.srt.environ import envs
|
||||
from sglang.srt.utils import kill_process_tree
|
||||
from sglang.test.ci.ci_register import register_cuda_ci
|
||||
from sglang.test.run_eval import run_eval
|
||||
@@ -87,49 +86,49 @@ class TestDeepseekMTP(CustomTestCase):
|
||||
def setUpClass(cls):
|
||||
cls.model = DEFAULT_DEEPEP_MODEL_NAME_FOR_TEST
|
||||
cls.base_url = DEFAULT_URL_FOR_TEST
|
||||
with envs.SGLANG_ENABLE_SPEC_V2.override(False):
|
||||
cls.process = popen_launch_server(
|
||||
cls.model,
|
||||
cls.base_url,
|
||||
timeout=DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
|
||||
other_args=[
|
||||
"--trust-remote-code",
|
||||
"--tp",
|
||||
"8",
|
||||
"--enable-dp-attention",
|
||||
"--dp",
|
||||
"8",
|
||||
"--moe-dense-tp-size",
|
||||
"1",
|
||||
"--enable-dp-lm-head",
|
||||
"--moe-a2a-backend",
|
||||
"deepep",
|
||||
"--moe-runner-backend",
|
||||
"deep_gemm",
|
||||
"--enable-two-batch-overlap",
|
||||
"--ep-num-redundant-experts",
|
||||
"32",
|
||||
"--ep-dispatch-algorithm",
|
||||
"dynamic",
|
||||
"--eplb-algorithm",
|
||||
"deepseek",
|
||||
"--cuda-graph-bs",
|
||||
"64", # TODO: increase it to 128 when TBO is supported in draft_extend
|
||||
"--max-running-requests",
|
||||
"512",
|
||||
"--speculative-algorithm",
|
||||
"EAGLE",
|
||||
"--speculative-num-steps",
|
||||
"1",
|
||||
"--speculative-eagle-topk",
|
||||
"1",
|
||||
"--speculative-num-draft-tokens",
|
||||
"2",
|
||||
"--disable-radix-cache",
|
||||
"--model-loader-extra-config",
|
||||
'{"enable_multithread_load": true,"num_threads": 64}',
|
||||
],
|
||||
)
|
||||
cls.process = popen_launch_server(
|
||||
cls.model,
|
||||
cls.base_url,
|
||||
timeout=DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
|
||||
other_args=[
|
||||
"--disable-overlap-schedule",
|
||||
"--trust-remote-code",
|
||||
"--tp",
|
||||
"8",
|
||||
"--enable-dp-attention",
|
||||
"--dp",
|
||||
"8",
|
||||
"--moe-dense-tp-size",
|
||||
"1",
|
||||
"--enable-dp-lm-head",
|
||||
"--moe-a2a-backend",
|
||||
"deepep",
|
||||
"--moe-runner-backend",
|
||||
"deep_gemm",
|
||||
"--enable-two-batch-overlap",
|
||||
"--ep-num-redundant-experts",
|
||||
"32",
|
||||
"--ep-dispatch-algorithm",
|
||||
"dynamic",
|
||||
"--eplb-algorithm",
|
||||
"deepseek",
|
||||
"--cuda-graph-bs",
|
||||
"64", # TODO: increase it to 128 when TBO is supported in draft_extend
|
||||
"--max-running-requests",
|
||||
"512",
|
||||
"--speculative-algorithm",
|
||||
"EAGLE",
|
||||
"--speculative-num-steps",
|
||||
"1",
|
||||
"--speculative-eagle-topk",
|
||||
"1",
|
||||
"--speculative-num-draft-tokens",
|
||||
"2",
|
||||
"--disable-radix-cache",
|
||||
"--model-loader-extra-config",
|
||||
'{"enable_multithread_load": true,"num_threads": 64}',
|
||||
],
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
|
||||
@@ -59,7 +59,6 @@ class TestDeepseekV32(unittest.TestCase):
|
||||
]
|
||||
+ MTP_ARGS,
|
||||
variant="TP4+DP4+DPA+MTP",
|
||||
env={"SGLANG_ENABLE_SPEC_V2": "1"},
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
@@ -62,7 +62,6 @@ class TestDeepseekV32Nvfp4(unittest.TestCase):
|
||||
]
|
||||
+ MTP_ARGS,
|
||||
variant="TP4+DP4+DPA+MTP",
|
||||
env={"SGLANG_ENABLE_SPEC_V2": "1"},
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
@@ -50,7 +50,6 @@ class TestGlm5Fp8(unittest.TestCase):
|
||||
+ ["--dp-size=4", "--enable-dp-attention"]
|
||||
+ MTP_ARGS,
|
||||
variant="TP4+DP4+DPA+MTP",
|
||||
env={"SGLANG_ENABLE_SPEC_V2": "1"},
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
@@ -53,7 +53,6 @@ class TestGlm5Nvfp4(unittest.TestCase):
|
||||
+ ["--dp-size=4", "--enable-dp-attention"]
|
||||
+ MTP_ARGS,
|
||||
variant="TP4+DP4+DPA+MTP",
|
||||
env={"SGLANG_ENABLE_SPEC_V2": "1"},
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
@@ -55,7 +55,6 @@ class TestQwen35Fp8(unittest.TestCase):
|
||||
+ ["--dp-size=4", "--enable-dp-attention"]
|
||||
+ MTP_ARGS,
|
||||
variant="TP4+DP4+DPA+MTP",
|
||||
env={"SGLANG_ENABLE_SPEC_V2": "1"},
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
@@ -59,7 +59,6 @@ class TestQwen35Nvfp4(unittest.TestCase):
|
||||
+ ["--dp-size=4", "--enable-dp-attention"]
|
||||
+ MTP_ARGS,
|
||||
variant="TP4+DP4+DPA+MTP",
|
||||
env={"SGLANG_ENABLE_SPEC_V2": "1"},
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ from types import SimpleNamespace
|
||||
|
||||
import requests
|
||||
|
||||
from sglang.srt.environ import envs
|
||||
from sglang.srt.utils import kill_process_tree
|
||||
from sglang.test.ci.ci_register import register_cuda_ci
|
||||
from sglang.test.kits.reasoning_kit import ReasoningTokenUsageMixin
|
||||
@@ -92,7 +91,6 @@ class TestQwen35FP4MTP(ReasoningTokenUsageMixin, CustomTestCase):
|
||||
cls.model = QWEN35_FP4_MODEL
|
||||
cls.base_url = DEFAULT_URL_FOR_TEST
|
||||
cls.init_reasoning_token_verifier()
|
||||
envs.SGLANG_ENABLE_SPEC_V2.set(True)
|
||||
cls.process = popen_launch_server(
|
||||
cls.model,
|
||||
cls.base_url,
|
||||
@@ -102,7 +100,6 @@ class TestQwen35FP4MTP(ReasoningTokenUsageMixin, CustomTestCase):
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
envs.SGLANG_ENABLE_SPEC_V2.set(False)
|
||||
kill_process_tree(cls.process.pid)
|
||||
|
||||
def test_gsm8k(self):
|
||||
@@ -117,7 +114,6 @@ class TestQwen35FP4MTPFlashInfer(ReasoningTokenUsageMixin, CustomTestCase):
|
||||
cls.model = QWEN35_FP4_MODEL
|
||||
cls.base_url = DEFAULT_URL_FOR_TEST
|
||||
cls.init_reasoning_token_verifier()
|
||||
envs.SGLANG_ENABLE_SPEC_V2.set(True)
|
||||
cls.process = popen_launch_server(
|
||||
cls.model,
|
||||
cls.base_url,
|
||||
@@ -132,7 +128,6 @@ class TestQwen35FP4MTPFlashInfer(ReasoningTokenUsageMixin, CustomTestCase):
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
envs.SGLANG_ENABLE_SPEC_V2.set(False)
|
||||
kill_process_tree(cls.process.pid)
|
||||
|
||||
def test_gsm8k(self):
|
||||
|
||||
@@ -3,7 +3,6 @@ import unittest
|
||||
import numpy as np
|
||||
import requests
|
||||
|
||||
from sglang.srt.environ import envs
|
||||
from sglang.test.ci.ci_register import register_cuda_ci
|
||||
from sglang.test.kits.eval_accuracy_kit import GSM8KMixin
|
||||
from sglang.test.server_fixtures.default_fixture import DefaultServerBase
|
||||
@@ -51,11 +50,6 @@ class TestStep3p5FlashChainMTP(GSM8KMixin, DefaultServerBase):
|
||||
gsm8k_accuracy_thres = 0.83
|
||||
gsm8k_accept_length_thres = 2.6
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
with envs.SGLANG_ENABLE_SPEC_V2.override(True):
|
||||
super().setUpClass()
|
||||
|
||||
def test_logprob_spec_v2_match(self):
|
||||
"""Verify spec v2 decode logprobs match prefill scoring logprobs.
|
||||
|
||||
|
||||
@@ -55,7 +55,6 @@ class TestDeepseekR1FP4Unified(unittest.TestCase):
|
||||
tp_size=4,
|
||||
extra_args=base_args + mtp_args,
|
||||
variant="TP4+MTP",
|
||||
env={"SGLANG_ENABLE_SPEC_V2": "1"},
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
@@ -57,7 +57,6 @@ class TestStreamingSessionEagleV2RetractLargePage(TestStreamingSession):
|
||||
"256",
|
||||
]
|
||||
env_overrides = [
|
||||
("SGLANG_ENABLE_SPEC_V2", True),
|
||||
("SGLANG_TEST_RETRACT", True),
|
||||
("SGLANG_ALLOW_OVERWRITE_LONGER_CONTEXT_LEN", True),
|
||||
]
|
||||
|
||||
@@ -74,7 +74,6 @@ class TestStreamingSessionEagleV2(StreamingSessionServerBase, StreamingSessionKi
|
||||
*_EAGLE3_SPEC_ARGS,
|
||||
]
|
||||
env_overrides = [
|
||||
("SGLANG_ENABLE_SPEC_V2", True),
|
||||
("SGLANG_ALLOW_OVERWRITE_LONGER_CONTEXT_LEN", True),
|
||||
]
|
||||
|
||||
|
||||
@@ -28,7 +28,8 @@ class TestDFlashServerBase(CustomTestCase, MatchedStopMixin, GSM8KMixin):
|
||||
attention_backend = "flashinfer"
|
||||
page_size = 1
|
||||
other_launch_args = []
|
||||
spec_v2 = False
|
||||
# Base classes exercise the non-overlap (synchronous) scheduling path.
|
||||
disable_overlap = True
|
||||
overlap_plan_stream = False
|
||||
model = DEFAULT_TARGET_MODEL_DFLASH
|
||||
draft_model = DEFAULT_DRAFT_MODEL_DFLASH
|
||||
@@ -57,9 +58,10 @@ class TestDFlashServerBase(CustomTestCase, MatchedStopMixin, GSM8KMixin):
|
||||
"--cuda-graph-bs",
|
||||
*[str(i) for i in range(1, cls.max_running_requests + 1)],
|
||||
]
|
||||
if cls.disable_overlap:
|
||||
launch_args.append("--disable-overlap-schedule")
|
||||
launch_args.extend(cls.other_launch_args)
|
||||
with (
|
||||
envs.SGLANG_ENABLE_SPEC_V2.override(cls.spec_v2),
|
||||
envs.SGLANG_ENABLE_OVERLAP_PLAN_STREAM.override(cls.overlap_plan_stream),
|
||||
envs.SGLANG_ENABLE_STRICT_MEM_CHECK_DURING_BUSY.override(1),
|
||||
envs.SGLANG_ENABLE_ASYNC_ASSERT.override(True),
|
||||
@@ -150,7 +152,7 @@ class TestDFlashServerNoCudaGraph(TestDFlashServerBase):
|
||||
|
||||
|
||||
class TestDFlashServerSpecV2(TestDFlashServerBase):
|
||||
spec_v2 = True
|
||||
disable_overlap = False
|
||||
|
||||
def test_radix_attention(self):
|
||||
run_radix_attention_test(self.base_url)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import unittest
|
||||
|
||||
from sglang.srt.environ import envs
|
||||
from sglang.srt.utils import kill_process_tree
|
||||
from sglang.test.ci.ci_register import register_amd_ci, register_cuda_ci
|
||||
from sglang.test.kits.json_constrained_kit import JSONConstrainedMixin
|
||||
@@ -31,7 +30,8 @@ class TestEagleConstrainedDecoding(
|
||||
model = DEFAULT_TARGET_MODEL_EAGLE
|
||||
draft_model = DEFAULT_DRAFT_MODEL_EAGLE
|
||||
grammar_backend = "xgrammar"
|
||||
spec_v2 = False
|
||||
# Run the synchronous (non-overlap) scheduling path.
|
||||
disable_overlap = True
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
@@ -59,14 +59,15 @@ class TestEagleConstrainedDecoding(
|
||||
"--grammar-backend",
|
||||
cls.grammar_backend,
|
||||
]
|
||||
if cls.disable_overlap:
|
||||
launch_args.append("--disable-overlap-schedule")
|
||||
launch_args.extend(cls.other_launch_args)
|
||||
with envs.SGLANG_ENABLE_SPEC_V2.override(cls.spec_v2):
|
||||
cls.process = popen_launch_server(
|
||||
cls.model,
|
||||
cls.base_url,
|
||||
timeout=DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
|
||||
other_args=launch_args,
|
||||
)
|
||||
cls.process = popen_launch_server(
|
||||
cls.model,
|
||||
cls.base_url,
|
||||
timeout=DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
|
||||
other_args=launch_args,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
@@ -74,7 +75,7 @@ class TestEagleConstrainedDecoding(
|
||||
|
||||
|
||||
class TestEagleConstrainedDecodingV2(TestEagleConstrainedDecoding):
|
||||
spec_v2 = True
|
||||
disable_overlap = False
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -13,14 +13,14 @@ class TestStandaloneSpeculativeDecodingBase(StandaloneServerBase, CustomTestCase
|
||||
attention_backend = "fa3"
|
||||
speculative_eagle_topk = 2
|
||||
speculative_num_draft_tokens = 7
|
||||
enable_spec_v2 = False
|
||||
disable_overlap = True
|
||||
|
||||
|
||||
class TestStandaloneSpeculativeDecodingTriton(StandaloneServerBase, CustomTestCase):
|
||||
attention_backend = "triton"
|
||||
speculative_eagle_topk = 2
|
||||
speculative_num_draft_tokens = 7
|
||||
enable_spec_v2 = False
|
||||
disable_overlap = True
|
||||
enable_deterministic_inference = True
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ class TestStandaloneSpeculativeDecodingFlashinfer(StandaloneServerBase, CustomTe
|
||||
attention_backend = "flashinfer"
|
||||
speculative_eagle_topk = 2
|
||||
speculative_num_draft_tokens = 7
|
||||
enable_spec_v2 = False
|
||||
disable_overlap = True
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user