Skip to content

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 for NixlPullConnector.

Classes:

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(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:

save_kv_layer(layer_name, kv_layer, attn_metadata, **kwargs)

NixlConnector does not save explicitly.

set_xfer_handshake_metadata_pp_aware(metadata)

Set handshake metadata keyed by (pp_rank, tp_rank) so the side channel can serve every PP stage's agent metadata.

Parameters:

  • metadata

    (dict) –

    the handshake metadata to set.

wait_for_layer_load(layer_name)

NixlConnector does not do layerwise saving.

NixlPullConnector

Bases: NixlBaseConnector

Pull-based (READ) NIXL KV transfer connector.

NixlPushConnector

Bases: NixlBaseConnector

Push-based (WRITE) NIXL KV transfer connector.

Methods:

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.