Decouple speculative draft capacity from runtime state (#36897)

Co-authored-by: Ming Yang <minos.future@gmail.com>
This commit is contained in:
Lianmin Zheng
2026-08-30 23:31:25 -07:00
committed by GitHub
co-authored by Ming Yang
parent 2cb3f32b03
commit 3ed3326631
6 changed files with 80 additions and 51 deletions
@@ -41,6 +41,7 @@ from sglang.srt.arg_groups.moe_hook import (
)
from sglang.srt.arg_groups.overrides import (
cutedsl_moe_max_num_tokens,
max_speculative_num_draft_tokens,
resolution_result,
)
from sglang.srt.arg_groups.parallel_hook import (
@@ -1681,6 +1682,7 @@ class TestAdaptiveSpecArgs(CustomTestCase):
)
handle_speculative_decoding(args)
self.assertEqual(max_speculative_num_draft_tokens(args), 6)
self.assertTrue(resolution_result(args, "speculative_adaptive"))
self.assertEqual(resolution_result(args, "speculative_eagle_topk"), 1)