vllm.model_executor.model_loader.weight_cache.weight_seed
¶
Daemon-to-daemon weight shard seeding (movers, the seedable, the peer loader).
Modules:
-
core–Weight movers: copy storage bytes so views keep their sharing and footprint.
-
loader–Fill a daemon's model with a source replica's post-processed weights.
-
mooncake–The Mooncake weight mover: pull storages through the TransferEngine.
-
peer_ipc–The
peer_ipcweight mover: copy storages between GPUs on one host. -
seed–The weights seedable: a daemon both serves and fetches its shard.
-
utils–Helpers for weight shard seeding (manifest format, fingerprint, launcher logic).
Classes:
-
WeightMover–One mover that copies weight storages from a source daemon.
-
WeightShardSeed–This daemon's weight shard: served to and fetched from peer daemons.
Functions:
-
build_manifest–Describe
tensorsas views over their unique storages. -
get_mover–The mover for a backend;
device_indexpins the peer_ipc device. -
rebuild_tensors–Recreate every manifest tensor on the mirror's copies; bounds-checked first.
WeightMover
¶
Bases: ABC
One mover that copies weight storages from a source daemon.
Methods:
-
copy_into–Copy each source storage's logical bytes into its local byte buffer.
-
fill–Copy the source's storages and rebuild its tensors on them.
-
prepare_seed–Publish how a mirror can read each storage, in manifest order.
-
release–Drop source-side state for the weights the daemon is releasing.
copy_into(storages, seed, buffers)
abstractmethod
¶
Copy each source storage's logical bytes into its local byte buffer.
fill(manifest, seed, device)
¶
Copy the source's storages and rebuild its tensors on them.
prepare_seed(storages)
abstractmethod
¶
Publish how a mirror can read each storage, in manifest order.
release()
¶
Drop source-side state for the weights the daemon is releasing.
WeightShardSeed
¶
Bases: Seedable
This daemon's weight shard: served to and fetched from peer daemons.
Methods:
-
request_params–Ask this daemon's source for the shard, over the fitting mover.
-
resolve–Describe this rank so a peer daemon can mirror it.
-
validate_payload–Structural checks plus the shard fingerprint against this daemon.
-
validate_remote–Refuse node-local movers on the remote control plane.
request_params(ctx)
¶
Ask this daemon's source for the shard, over the fitting mover.
resolve(request)
¶
Describe this rank so a peer daemon can mirror it.
validate_payload(payload)
¶
Structural checks plus the shard fingerprint against this daemon.
validate_remote(request)
¶
Refuse node-local movers on the remote control plane.
build_manifest(tensors, kinds)
¶
Describe tensors as views over their unique storages.
get_mover(name, *, device_index=None, ipc_backend=None)
¶
The mover for a backend; device_index pins the peer_ipc device.
rebuild_tensors(manifest, buffers)
¶
Recreate every manifest tensor on the mirror's copies; bounds-checked first.