[Spec Decode] Enable Gemma4 DSpark adaptive verification with FlashInfer (#57263)
Signed-off-by: zixi-qi <zixi@inferact.ai> Co-authored-by: OpenAI Codex <noreply@openai.com> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Co-authored-by: Nick Hill <nickhill123@gmail.com>
This commit is contained in:
co-authored by
OpenAI Codex
Claude Opus 5.5
Nick Hill
parent
3b4566c5cf
commit
a4eb3f25d6
@@ -455,13 +455,29 @@ def test_mla_dcp_manager_selects_fallback_backends(monkeypatch):
|
||||
)
|
||||
|
||||
|
||||
def test_dcp_workspace_covers_parallel_drafting():
|
||||
@pytest.mark.parametrize(
|
||||
("parallel_drafting", "use_v2_model_runner", "expected"),
|
||||
[
|
||||
# Model runner V1's parallel drafter widens requests to 1 + 2 * 3.
|
||||
(True, False, 28),
|
||||
(True, True, 16),
|
||||
# A diffusion canvas of 3 without a speculative config.
|
||||
(None, True, 16),
|
||||
],
|
||||
)
|
||||
def test_dcp_workspace_covers_decode_width(
|
||||
parallel_drafting, use_v2_model_runner, expected
|
||||
):
|
||||
config = _manager_config()
|
||||
config.scheduler_config.max_num_batched_tokens = 128
|
||||
config.num_speculative_tokens = 3
|
||||
config.speculative_config = MagicMock(parallel_drafting=True)
|
||||
config.use_v2_model_runner = use_v2_model_runner
|
||||
if parallel_drafting is not None:
|
||||
config.speculative_config = MagicMock(
|
||||
num_speculative_tokens=3, parallel_drafting=parallel_drafting
|
||||
)
|
||||
|
||||
assert dcp.get_dcp_workspace_max_num_tokens(config) == 28
|
||||
assert dcp.get_dcp_workspace_max_num_tokens(config) == expected
|
||||
|
||||
|
||||
def test_mla_dcp_manager_selects_pcp_combine(monkeypatch):
|
||||
|
||||
Reference in New Issue
Block a user