Skip to content

vllm.config.ec_transfer

Classes:

ECTransferConfig

Configuration for distributed EC cache transfer.

Methods:

Attributes:

ec_buffer_device = 'cuda' class-attribute instance-attribute

The device used by ec connector to buffer the EC cache. Currently only support 'cuda'.

ec_buffer_size = 1000000000.0 class-attribute instance-attribute

The buffer size for TorchDistributedConnector. Measured in number of bytes. Recommended value: 1e9 (about 1GB).

ec_connector = None class-attribute instance-attribute

The EC connector for vLLM to transmit EC caches between vLLM instances.

Built-in options include ECExampleConnector (shared filesystem via safetensors) and ECMooncakeConnector (Mooncake TransferEngine RDMA; requires mooncake-transfer-engine and matching producer/consumer ec_connector_extra_config; see mooncake_ec_connector module docstring). Set cross_encoder_cache in Mooncake extra config to reuse shared Encoder outputs from Store before encoding, retaining P2P delivery.

ec_connector_extra_config = field(default_factory=dict) class-attribute instance-attribute

any extra config that the connector may need.

ec_connector_module_path = None class-attribute instance-attribute

The Python module path to dynamically load the EC connector from. Only supported in V1.

ec_ip = '127.0.0.1' class-attribute instance-attribute

The EC connector ip, used to build distributed connection.

ec_port = 14579 class-attribute instance-attribute

The EC connector port, used to build distributed connection.

ec_role = None class-attribute instance-attribute

Whether this vLLM instance produces, consumes EC cache, or both. Choices are 'ec_producer', 'ec_consumer', 'ec_both'.

engine_id = None class-attribute instance-attribute

The engine id for EC transfers.

is_encode_only property

Whether this instance encodes but does not run the language model.

It allocates no KV cache either -- GPUModelRunner.get_kv_cache_layer_configs returns {} for it -- so it is the one role that can spend accelerator time and memory on frontend work.

mm_encoder_output_widths = field(default_factory=dict, init=False) class-attribute instance-attribute

Per-token width of the encoder output for each modality, measured by EC producers at startup. It can exceed the LM embedding width (e.g. DeepStack).

compile_factors()

This config does not affect the compiled graph.

If a field starts affecting it, return get_compile_factors(self, ignored_factors) with every other field in ignored_factors.