vllm.distributed.kv_transfer.kv_connector.v1.nixl.connector
¶
NIXL connector facades.
This module hosts the thin facade classes that vLLM's KV-connector layer instantiates. Almost all the real work lives in the per-mode scheduler and worker classes; the connector classes here only forward calls.
NixlBaseConnector– common logic shared by pull and push.NixlPullConnector– pull-based (READ) KV transfer.NixlPushConnector– push-based (WRITE) KV transfer.NixlConnector– backward-compatible alias forNixlPullConnector.
Classes:
-
NixlBaseConnector–Base connector with common logic shared by pull and push modes.
-
NixlPullConnector–Pull-based (READ) NIXL KV transfer connector.
-
NixlPushConnector–Push-based (WRITE) NIXL KV transfer connector.
NixlBaseConnector
¶
Bases: KVConnectorBase_V1, SupportsHMA
Base connector with common logic shared by pull and push modes.
Methods:
-
get_block_ids_with_load_errors–Get block IDs that failed to load via NIXL.
-
get_finished–Get the finished recving and sending requests.
-
get_handshake_metadata–Get the KVConnector handshake metadata for this connector.
-
save_kv_layer–NixlConnector does not save explicitly.
-
set_xfer_handshake_metadata_pp_aware–Set handshake metadata keyed by (pp_rank, tp_rank) so the side
-
wait_for_layer_load–NixlConnector does not do layerwise saving.
get_block_ids_with_load_errors()
¶
Get block IDs that failed to load via NIXL.
get_finished(finished_req_ids)
¶
Get the finished recving and sending requests.
get_handshake_metadata()
¶
Get the KVConnector handshake metadata for this connector. This metadata is used for out-of-band connector handshake between P/D workers.
Returns:
-
KVConnectorHandshakeMetadata(KVConnectorHandshakeMetadata | None) –the handshake metadata.
-
KVConnectorHandshakeMetadata | None–None if no handshake metadata is available.
save_kv_layer(layer_name, kv_layer, attn_metadata, **kwargs)
¶
NixlConnector does not save explicitly.
set_xfer_handshake_metadata_pp_aware(metadata)
¶
wait_for_layer_load(layer_name)
¶
NixlConnector does not do layerwise saving.
NixlPullConnector
¶
NixlPushConnector
¶
Bases: NixlBaseConnector
Push-based (WRITE) NIXL KV transfer connector.
Methods:
-
start_load_kv–Drive push processing on the worker.
start_load_kv(forward_context, **kwargs)
¶
Drive push processing on the worker.
The worker enqueues registrations / finished blocks for the
background nixl-push-writer thread; the writer issues the
WRITE transfers and polls NIXL notifs without further
engine-thread involvement.