IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).

Python class

TransferReqData

TransferReqData

class max.pipelines.kv_cache.TransferReqData(*, dst_name, src_name, transfer_name, transfer_ids, src_idxs, dst_idxs, src_replica_idx, dst_replica_idx, is_read=False, tp_shard_count=0, local_shards_used=<factory>)

source

Bases: Struct

Metadata associated with a transfer request.

This is safe to send between threads/processes.

Parameters:

dst_idxs

dst_idxs: list[int]

source

Length of destination indices can differ from len(transfer_ids).

dst_name

dst_name: str

source

Base name of destination engine.

dst_replica_idx

dst_replica_idx: int

source

Index of the destination replica this transfer is to.

is_read

is_read: bool

source

True if this is a READ (pull) transfer initiated by the destination.

local_shards_used

local_shards_used: list[int]

source

Physical TP shard indices on the initiator that own this transfer’s handles. Empty means “all shards in the recorded replica” (pre-flatten behavior). Required to release/status-check transfers when flatten_local has picked a subset of shards.

src_idxs

src_idxs: list[int]

source

Length of source indices can differ from len(transfer_ids).

src_name

src_name: str

source

Base name of source engine.

src_replica_idx

src_replica_idx: int

source

Index of the source replica this transfer is from.

tp_shard_count

tp_shard_count: int

source

Number of TP shards participating. 0 = all shards (backwards compat).

transfer_ids

transfer_ids: list[int]

source

Transfer IDs (one per TP shard in the replica).

transfer_name

transfer_name: str

source

Transfer name.