Skip to content

vllm.v1.hisparse.types

Classes:

SparseKVOffloadCommand dataclass

Opaque scheduler-to-worker command for one model step.

Source code in vllm/v1/hisparse/types.py
@dataclass
class SparseKVOffloadCommand:
    """Opaque scheduler-to-worker command for one model step."""

    page_transfers: list[SparseKVPageTransfer]

SparseKVPageTransfer dataclass

Copy one logical KV page between cache-manager and worker-owned tiers.

Source code in vllm/v1/hisparse/types.py
@dataclass(frozen=True)
class SparseKVPageTransfer:
    """Copy one logical KV page between cache-manager and worker-owned tiers."""

    transfer_id: int
    destination_block_id: int
    source_block_ids: tuple[int, ...]
    after_forward: bool

SparseKVRowMirror dataclass

Mirror one contiguous resident-row span into the host cache.

Source code in vllm/v1/hisparse/types.py
@dataclass(frozen=True)
class SparseKVRowMirror:
    """Mirror one contiguous resident-row span into the host cache."""

    source_starts: tuple[int, ...]
    destination_start: int
    num_rows: int