Skip to content

vllm.model_executor.model_loader.weight_cache.transport

Daemon-to-daemon seeding over authenticated JSON/TCP or local pickle.

A Seedable is one kind of state a daemon can seed to or from a peer daemon, including warmup caches and weight shards. The target names what it wants by kind and key fields; the source resolves the key to a payload; the target validates and installs it:

request:  {"kind": "flashinfer_autotune", <key fields>..., "token": "..."}
response: {"status": "ok", "payload": <kind-specific>}
          {"status": "miss"} | {"status": "error", "message": "..."}

Remote payloads are JSON values. Large binary state (weights) must not be inlined: the payload then describes the transfer (e.g. a storage manifest), and the caller drives the data plane itself.

The TCP connection is unencrypted beyond the shared token; keep the listener on a trusted network.

Classes:

  • SeedConfig –

    A daemon's D2D endpoints and shared token (Unix paths need none).

  • SeedTransport –

    The daemon's D2D seeding endpoint: serves and fetches seedables.

  • Seedable –

    One kind of state that can flow between peer daemons, both ways.

SeedConfig

Bases: NamedTuple

A daemon's D2D endpoints and shared token (Unix paths need none).

SeedTransport

The daemon's D2D seeding endpoint: serves and fetches seedables.

Methods:

  • adopt –

    Best-effort: fetch and install seedable from the source daemon.

  • fetch –

    Fetch and validate a seed payload; None on a miss, else raise.

  • handle_request –

    Source side: answer one request; remote=True applies validate_remote.

  • request –

    Send one request to the source daemon; None with a log line on failure.

  • start_listener –

    Serve this rank's seedables to peers; None when unconfigured.

Attributes:

source property

The configured source daemon address, if any.

_request_local(path, payload)

Fetch over the source's owner-verified Unix socket (pickle).

adopt(seedable, ctx)

Best-effort: fetch and install seedable from the source daemon.

Any failure degrades to the local path with a log line.

fetch(seedable, ctx)

Fetch and validate a seed payload; None on a miss, else raise.

handle_request(request, *, remote=False)

Source side: answer one request; remote=True applies validate_remote.

request(payload)

Send one request to the source daemon; None with a log line on failure.

start_listener()

Serve this rank's seedables to peers; None when unconfigured.

Seedable

Bases: Protocol

One kind of state that can flow between peer daemons, both ways.

Methods:

  • install –

    Target side: install a validated payload.

  • request_params –

    Target side: the key fields identifying what this rank needs.

  • resolve –

    Source side: produce the payload named by request.

  • validate_payload –

    Target side: validate the fetched payload, or raise ValueError.

  • validate_remote –

    Raise ValueError to refuse the request on the remote JSON plane.

install(ctx, payload)

Target side: install a validated payload.

request_params(ctx)

Target side: the key fields identifying what this rank needs.

resolve(request)

Source side: produce the payload named by request.

Validate the wire key first — raise an error on any malformed field (ValueError for bad values, KeyError for missing ones), before touching local state. The transport turns it into an error response. Return None on a miss.

validate_payload(payload)

Target side: validate the fetched payload, or raise ValueError.

validate_remote(request)

Raise ValueError to refuse the request on the remote JSON plane.