Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,13 @@ def test_is_default_v2_model_runner_model(model_config, expected):
assert VllmConfig._is_default_v2_model_runner_model(config) is expected


def test_use_v2_model_runner_defaults_to_v1_when_kv_connector_present():
config = SimpleNamespace(kv_transfer_config=object())
with patch.object(envs, "VLLM_USE_V2_MODEL_RUNNER", None):
result = VllmConfig.use_v2_model_runner.fget(config)
assert result is False


@pytest.mark.skip_global_cleanup
def test_with_hf_config_populates_missing_architectures_from_causal_lm_mapping(
monkeypatch,
Expand Down
4 changes: 4 additions & 0 deletions vllm/config/vllm.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,10 @@ def use_v2_model_runner(self) -> bool:
if use_v2_model_runner is not None:
return use_v2_model_runner

# KVCache layout changes are breaking, let's stick with v1 for now (see #42846)
if self.kv_transfer_config is not None:
return False
Comment thread
NickLucche marked this conversation as resolved.

if not self._is_default_v2_model_runner_model():
return False

Expand Down
Loading