[Nixl][PD] DCP support for MLA models (#50611)
Signed-off-by: NickLucche <nicolo.lucchesi@mistral.ai>
This commit is contained in:
@@ -17,8 +17,11 @@ import vllm.config.vllm as vllm_config_module
|
||||
import vllm.envs as envs
|
||||
from vllm.compilation.backends import VllmBackend
|
||||
from vllm.config import (
|
||||
CacheConfig,
|
||||
CompilationConfig,
|
||||
DeviceConfig,
|
||||
KernelConfig,
|
||||
KVTransferConfig,
|
||||
ModelConfig,
|
||||
ObservabilityConfig,
|
||||
ParallelConfig,
|
||||
@@ -100,6 +103,32 @@ def test_per_request_spec_decode_metrics_requires_spec_decode():
|
||||
)
|
||||
|
||||
|
||||
def test_pd_dcp_interleave_size_is_adjusted_to_block_size(caplog):
|
||||
config = VllmConfig(
|
||||
cache_config=CacheConfig(block_size=16),
|
||||
device_config=DeviceConfig(device="cpu"),
|
||||
parallel_config=ParallelConfig(
|
||||
tensor_parallel_size=2,
|
||||
decode_context_parallel_size=2,
|
||||
cp_kv_cache_interleave_size=3,
|
||||
distributed_executor_backend="mp",
|
||||
),
|
||||
kv_transfer_config=KVTransferConfig(
|
||||
kv_connector="NixlConnector",
|
||||
kv_role="kv_both",
|
||||
),
|
||||
)
|
||||
|
||||
kv_cache_config = SimpleNamespace(
|
||||
kv_cache_groups=[SimpleNamespace(kv_cache_spec=SimpleNamespace(block_size=16))]
|
||||
)
|
||||
with caplog.at_level(logging.INFO):
|
||||
config.adjust_dcp_kv_cache_interleave_size(kv_cache_config)
|
||||
|
||||
assert config.parallel_config.cp_kv_cache_interleave_size == 16
|
||||
assert "automatically adjusted from 3 to block_size 16" in caplog.text
|
||||
|
||||
|
||||
def test_compile_config_repr_succeeds():
|
||||
# setup: VllmBackend mutates the config object
|
||||
config = VllmConfig()
|
||||
@@ -1730,6 +1759,7 @@ def test_validate_mamba_align_subblock_prefill():
|
||||
long_prefill_token_threshold=4096,
|
||||
disable_chunked_mm_input=False,
|
||||
),
|
||||
kv_transfer_config=None,
|
||||
)
|
||||
|
||||
VllmConfig.validate_block_size(config)
|
||||
|
||||
Reference in New Issue
Block a user