Skip to content

vllm.distributed.kv_transfer.kv_connector.v1.umbp

Modules:

  • connector –

    vLLM-facing shared UMBP connector.

  • data –

    Shared data types for the UMBP KV connector.

  • runtime –
  • scheduler –

    Shared scheduler-side UMBP connector behavior.

  • stats –

    Shared UMBP connector transfer statistics.

  • worker –

    Shared worker-side UMBP connector behavior.

Classes:

BlockIdentityCodec dataclass

Build stable rank-local keys from vLLM block hashes.

Groups in replicated_groups get one TP-agnostic key (tp*) that every TP rank loads and only TP rank 0 stores.

Methods:

  • keys_per_object –

    Number of rank keys that together hold one logical block.

keys_per_object(topology, group_id)

Number of rank keys that together hold one logical block.

BlockTransferPlan dataclass

One complete logical block transfer.

KVLayoutDescriptor dataclass

Backend-neutral description of one rank-local KV object layout.

KVLayoutPlanner

Create a deterministic all-layer object layout from KVCacheConfig.

Methods:

  • plan_for_block –

    Lower one GPU block into a deterministic scatter/gather plan.

  • register_kv_caches –

    Capture stable base addresses for the planned KV regions.

plan_for_block(key, block_id, base_addresses, *, group_id=None, request_id=None)

Lower one GPU block into a deterministic scatter/gather plan.

register_kv_caches(kv_caches)

Capture stable base addresses for the planned KV regions.

KVRange

Bases: NamedTuple

A source/destination range in a runtime transfer.

KVRegion dataclass

One deterministic region in a rank-local KV object.

LoadSpec dataclass

Scheduler decision for one externally loaded prefix.

RankTopology dataclass

Model-parallel ranks that participate in one KV object.

RequestTracker dataclass

Core request state shared by every runtime mode.

Methods:

  • mark_saved –

    Advance the save watermark only to a complete block boundary.

  • replace_blocks –

    Replace stale pre-preemption tables with resumed full tables.

mark_saved(token_count, block_size)

Advance the save watermark only to a complete block boundary.

replace_blocks(block_ids)

Replace stale pre-preemption tables with resumed full tables.

TransferJobState dataclass

Per-key completion state; one failed key does not fail its siblings.

UMBPConnectorMetadata dataclass

Bases: KVConnectorMetadata

Scheduler-to-worker metadata for one engine step.

UMBPConnectorWorkerMetadata dataclass

Bases: KVConnectorWorkerMetadata

Worker completion metadata aggregated across ranks.

UMBPNamespace dataclass

Compatibility namespace for objects stored outside the engine.

Methods:

  • configured –

    Return the explicit key_namespace, or None when it is derived.

  • from_vllm_config –

    Derive the namespace from a worker's per-layer KV cache config.

configured(vllm_config) classmethod

Return the explicit key_namespace, or None when it is derived.

from_vllm_config(vllm_config, kv_cache_config) classmethod

Derive the namespace from a worker's per-layer KV cache config.

The scheduler holds a single worker's config, so it adopts the namespace its workers report instead.

UMBPRuntimeConfig dataclass

Shared connector options passed to the selected runtime adapter.

Methods:

resolve_for_rank_count(rank_count)

Pass topology to the adapter without interpreting its capacity options.

UMBPRuntimeFactory

Registry used by UMBP adapters without importing MORI in vLLM.

UMBPStoreConnector

Bases: KVConnectorBase_V1, SupportsHMA

vLLM connector lifecycle shared by every UMBP runtime mode.

UMBPStoreConnectorStats dataclass

Bases: KVConnectorStats

Serializable interval counters shared by every UMBP runtime.

UMBPStoreKVEvents

Bases: KVConnectorKVEvents

Ordered, deduplicated UMBP events ready for publication.

Methods:

  • add_events –

    Merge duplicate worker reports within one engine step.

  • append_events –

    Append events from a later step while preserving repetitions.

add_events(events)

Merge duplicate worker reports within one engine step.

append_events(events)

Append events from a later step while preserving repetitions.