[CI] [NVIDIA] DSv4.1-Flash: Split GB300 accuracy test into one file per config (#44696)

Co-authored-by: Mohammad Angkad <mohammad.angkad@radixark.ai>
This commit is contained in:
Mohammad Miadh Angkad
2026-10-16 13:40:03 -07:00
committed by GitHub
co-authored by Mohammad Angkad
parent a31a8c2bbd
commit 21791e7023
5 changed files with 143 additions and 80 deletions
+105
View File
@@ -0,0 +1,105 @@
"""Shared DeepSeek-V4.1-Flash + DSPARK accuracy recipe for the GB300 tests.
Each server configuration lives in its own file under
``test/registered/e2e/models/test_deepseek_v41_flash_gb300_*.py`` so the
configurations partition independently across GB300 runners.
"""
import requests
from sglang.srt.utils import kill_process_tree
from sglang.test.kits.eval_accuracy_kit import GSM8KMixin, _run_accuracy_eval
from sglang.test.test_utils import (
DEFAULT_URL_FOR_TEST,
popen_launch_server,
try_cached_model,
)
MODEL = "deepseek-ai/DeepSeek-V4.1-Flash"
# Tensor-parallel attention and expert-parallel MoE, without DP attention.
TP4_EP4_ARGS = ["--attn-dp-size", "1", "--ep-size", "4"]
class DSV41FlashAccuracyMixin(GSM8KMixin):
# Use the zero-shot chat evaluator, not the legacy five-shot completion path.
gsm8k_backend = "sgl_eval"
gsm8k_score_threshold = 0.95
gsm8k_num_examples = 200
gsm8k_num_threads = 64
gsm8k_max_tokens = 4096
mmmu_pro_score_threshold = 0.75
mmmu_pro_num_examples = 200
mmmu_pro_num_threads = 64
# Bound long reasoning responses consistently across all CI recipes.
mmmu_pro_max_tokens = 32768
mmmu_pro_load_preset_from_model_id = MODEL
mem_fraction_static = "0.8"
max_running_requests = "64"
graph_args = []
parallel_args = []
server_env = {}
@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=3600,
other_args=[
"--trust-remote-code",
"--tp",
"4",
"--speculative-algorithm",
"DSPARK",
"--speculative-dspark-block-size",
"5",
"--mem-fraction-static",
cls.mem_fraction_static,
"--cuda-graph-max-bs-decode",
"64",
"--max-running-requests",
cls.max_running_requests,
"--reasoning-parser",
"auto",
"--tool-call-parser",
"auto",
"--disable-flashinfer-autotune",
*cls.parallel_args,
*cls.graph_args,
],
env=cls.server_env,
)
cls.addClassCleanup(kill_process_tree, cls.process.pid)
def assert_dspark_accepts_draft_tokens(self):
response = requests.get(self.base_url + "/server_info", timeout=30)
response.raise_for_status()
states = response.json()["internal_states"]
self.assertTrue(states, "Missing scheduler statistics")
accept_lengths = [state["avg_spec_accept_length"] for state in states]
self.assertGreater(
max(accept_lengths),
1.0,
f"DSPARK accepted no draft tokens: {accept_lengths}",
)
def test_gsm8k(self):
super().test_gsm8k()
self.assert_dspark_accepts_draft_tokens()
def test_mmmu_pro(self):
_run_accuracy_eval(
self,
eval_name="mmmu_pro",
score_threshold=self.mmmu_pro_score_threshold,
num_examples=self.mmmu_pro_num_examples,
num_threads=self.mmmu_pro_num_threads,
model=None,
load_preset_from_model_id=self.mmmu_pro_load_preset_from_model_id,
max_tokens=self.mmmu_pro_max_tokens,
)
self.assert_dspark_accepts_draft_tokens()