[SpecDecode] Add LiLiCorr drafter (#57934)

Signed-off-by: Andrii Skliar <askliar@nvidia.com>
Signed-off-by: Andrii Skliar <andreyws96@gmail.com>
Co-authored-by: Andrii Skliar <askliar@nvidia.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Benjamin Chislett <chislett.ben@gmail.com>
This commit is contained in:
Andrii Skliar
2026-09-25 10:08:28 -04:00
committed by GitHub
co-authored by Andrii Skliar Codex Benjamin Chislett
parent 25b0add7b8
commit 73a78e6f1f
21 changed files with 1944 additions and 110 deletions
+14 -9
View File
@@ -582,7 +582,7 @@ def test_rocm_mrv1_default_yields_to_v1_unsupported_config(monkeypatch):
speculative_config=None,
)
config._dflash_needs_multi_kv_group = lambda: False
config._is_dflash2_draft = lambda: False
config._is_dflash_candidate_draft = lambda: False
config._get_v2_model_runner_unsupported_features = lambda: []
# The real predicate, so the test also pins where dspark lands in it.
config._get_v1_model_runner_unsupported_features = lambda: (
@@ -813,7 +813,8 @@ def test_v2_model_runner_supports_custom_logits_processors():
assert config._get_v2_model_runner_unsupported_features() == []
def test_dflash2_draft_forces_v2_model_runner():
@pytest.mark.parametrize("architecture", ["DFlash2DraftModel", "LiLiCorrDraftModel"])
def test_dflash_candidate_draft_forces_v2_model_runner(architecture):
"""A DFlash2 draft must reach the V2 speculator, the only one that runs its
candidate selector; on V1 it would draft as DFlash1 without raising."""
@@ -825,11 +826,15 @@ def test_dflash2_draft_forces_v2_model_runner():
)
)
assert VllmConfig._is_dflash2_draft(config("dflash", ["DFlash2DraftModel"]))
assert not VllmConfig._is_dflash2_draft(config("dflash", ["DFlashDraftModel"]))
assert not VllmConfig._is_dflash2_draft(config("eagle", ["DFlash2DraftModel"]))
assert not VllmConfig._is_dflash2_draft(SimpleNamespace(speculative_config=None))
assert not VllmConfig._is_dflash2_draft(
assert VllmConfig._is_dflash_candidate_draft(config("dflash", [architecture]))
assert not VllmConfig._is_dflash_candidate_draft(
config("dflash", ["DFlashDraftModel"])
)
assert not VllmConfig._is_dflash_candidate_draft(config("eagle", [architecture]))
assert not VllmConfig._is_dflash_candidate_draft(
SimpleNamespace(speculative_config=None)
)
assert not VllmConfig._is_dflash_candidate_draft(
SimpleNamespace(
speculative_config=SimpleNamespace(method="dflash", draft_model_config=None)
)
@@ -1243,7 +1248,7 @@ def test_v1_model_runner_rejects_v2_only_features():
model_config=None,
)
config._dflash_needs_multi_kv_group = lambda: False
config._is_dflash2_draft = lambda: False
config._is_dflash_candidate_draft = lambda: False
config._get_v1_model_runner_unsupported_features = lambda: (
VllmConfig._get_v1_model_runner_unsupported_features(config)
)
@@ -1430,7 +1435,7 @@ def test_v1_model_runner_rejects_pipeline_parallelism_with_async_scheduling():
model_config=None,
)
config._dflash_needs_multi_kv_group = lambda: False
config._is_dflash2_draft = lambda: False
config._is_dflash_candidate_draft = lambda: False
assert VllmConfig._get_v1_model_runner_unsupported_features(config) == []