Fix grammar sync across TP ranks (#17100)

Co-authored-by: Liangsheng Yin <lsyincs@gmail.com>
This commit is contained in:
Lianmin Zheng
2026-01-15 18:38:01 -08:00
committed by GitHub
parent c81bad1bf7
commit e7dc85c50b
4 changed files with 112 additions and 116 deletions

View File

@@ -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.few_shot_gsm8k import run_eval as run_eval_few_shot_gsm8k
@@ -35,18 +34,17 @@ class TestDPAttentionDP2TP4(
def setUpClass(cls):
cls.model = DEFAULT_MLA_MODEL_NAME_FOR_TEST
cls.base_url = DEFAULT_URL_FOR_TEST
with envs.SGLANG_GRAMMAR_SIMULATE_TIMEOUT.override(0.5):
cls.process = popen_launch_server(
cls.model,
cls.base_url,
timeout=DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
other_args=[
"--trust-remote-code",
"--tp=4",
"--enable-dp-attention",
"--dp=2",
],
)
cls.process = popen_launch_server(
cls.model,
cls.base_url,
timeout=DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
other_args=[
"--trust-remote-code",
"--tp=4",
"--enable-dp-attention",
"--dp=2",
],
)
@classmethod
def tearDownClass(cls):
@@ -91,13 +89,12 @@ class TestDPAttentionDP2TP2DeepseekV3MTP(
]
if not is_in_amd_ci():
other_args += ["--mem-frac", "0.7"]
with envs.SGLANG_GRAMMAR_SIMULATE_TIMEOUT.override(0.5):
cls.process = popen_launch_server(
cls.model,
cls.base_url,
timeout=DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
other_args=other_args,
)
cls.process = popen_launch_server(
cls.model,
cls.base_url,
timeout=DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
other_args=other_args,
)
@classmethod
def tearDownClass(cls):