[KV Connector] Support sleep mode with MooncakeConnector over RDMA (#59625)
Signed-off-by: aoshen02 <aoshen@inferact.ai> Signed-off-by: Dakai An <dakaian108@gmail.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> Co-authored-by: Dakai An <dakaian108@gmail.com> Co-authored-by: Dakai An <77474977+andakai@users.noreply.github.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
Dakai An
Dakai An
parent
f4b8d43a68
commit
3ccc0a90b6
@@ -1199,6 +1199,21 @@ class VllmConfig:
|
||||
):
|
||||
return
|
||||
|
||||
if self.model_config is not None and self.model_config.enable_sleep_mode:
|
||||
# Lazy import to avoid circular dependencies
|
||||
from vllm.distributed.kv_transfer.kv_connector.factory import (
|
||||
KVConnectorFactory,
|
||||
)
|
||||
|
||||
connector_cls = KVConnectorFactory.get_connector_class(
|
||||
self.kv_transfer_config
|
||||
)
|
||||
if not connector_cls.supports_sleep_mode(self.kv_transfer_config):
|
||||
raise ValueError(
|
||||
f"{self.kv_transfer_config.kv_connector} does not support "
|
||||
"sleep mode."
|
||||
)
|
||||
|
||||
# PyTorch's expandable_segments allocator uses CUDA VMM, which can
|
||||
# remap a virtual address range to different physical pages over the
|
||||
# engine's lifetime. KV connectors that pin KV cache memory (e.g.
|
||||
|
||||
Reference in New Issue
Block a user