vllm.distributed.ec_transfer.ec_connector.cpu.common ¶
Shared types for the ECCPUConnector scheduler and worker delegates.
Classes:
-
ECCPUConnectorMetadata–Per-step scheduler → worker payload for the ECCPUConnector.
Functions:
-
create_ec_shared_region–Build the EC mmap region from
vllm_config.
ECCPUConnectorMetadata dataclass ¶
Bases: ECConnectorMetadata
Per-step scheduler → worker payload for the ECCPUConnector.
Populated by ECCPUScheduler.build_connector_meta; consumed by ECCPUWorker via the mixin's bind_connector_metadata.
Source code in vllm/distributed/ec_transfer/ec_connector/cpu/common.py
_get_encoder_cache_hidden_dim(vllm_config) ¶
Return the per-token hidden dimension for encoder cache entries.
For most models this equals the LLM's hidden size. Qwen3-VL (and any future model with deepstack visual encoding) is an exception: the ViT concatenates its own output with features from N decoder layers before storing in encoder_cache, producing a tensor of width out_hidden_size * (1 + N) per visual token. Using the plain LLM hidden size would under-allocate EC blocks and silently truncate the transferred data, leading to a shape mismatch on the consumer.
Source code in vllm/distributed/ec_transfer/ec_connector/cpu/common.py
create_ec_shared_region(vllm_config) ¶
Build the EC mmap region from vllm_config.
Both ECCPUScheduler and ECCPUWorker call this to get the same shared region (same engine_id, same block_size_bytes).