[BugFix] Reserve the bonus query slot in DFlash scheduling budget (#51256)
Signed-off-by: HF-001 <1670186653@qq.com>
This commit is contained in:
@@ -490,6 +490,30 @@ def test_draft_model_enables_async_scheduling_by_default():
|
||||
assert cfg.scheduler_config.async_scheduling is True
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("method", "parallel_drafting", "expected_slots"),
|
||||
[
|
||||
pytest.param("eagle3", False, 0, id="eagle3"),
|
||||
pytest.param("eagle3", True, 7, id="p-eagle"),
|
||||
pytest.param("dflash", True, 8, id="dflash"),
|
||||
pytest.param("dspark", True, 7, id="dspark"),
|
||||
pytest.param("mtp", False, 0, id="mtp"),
|
||||
pytest.param("ngram", False, 0, id="ngram"),
|
||||
pytest.param("draft_model", False, 1, id="draft-model"),
|
||||
pytest.param("draft_model", True, 8, id="pard"),
|
||||
],
|
||||
)
|
||||
def test_max_num_new_slots_for_drafting(method, parallel_drafting, expected_slots):
|
||||
speculative_config = SpeculativeConfig(
|
||||
model="ngram",
|
||||
num_speculative_tokens=8,
|
||||
)
|
||||
speculative_config.method = method
|
||||
speculative_config.parallel_drafting = parallel_drafting
|
||||
|
||||
assert speculative_config.max_num_new_slots_for_drafting == expected_slots
|
||||
|
||||
|
||||
@dataclass
|
||||
class _TestConfigFields:
|
||||
a: int
|
||||
|
||||
Reference in New Issue
Block a user