You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds optional delta-compressed weight transfer for
non-colocated vLLM collective refit.
This introduces a delta-aware packed weight transfer
protocol that can send either full weights or additive
deltas, with support for `dense`, `sparse_indices`, and
`sparse_bitmask` delta encodings. The trainer source rank
keeps a pinned CPU baseline of the last successfully
synced HF-format weights, computes deltas against that
baseline, and periodically sends full syncs
based on `full_sync_interval`.
The feature is disabled by default and only applies
to non-colocated vLLM refit. Colocated CUDA IPC,
vLLM FP8 weights, and ModelOpt quantized vLLM paths are rejected.
"""Prepare state dict metadata for weight refitting and IPC streaming.
108
+
defprepare_refit_info(
109
+
self,
110
+
state_dict_info: dict[str, Any],
111
+
delta_load_batch_size_bytes: int|None=None,
112
+
) ->None:
113
+
"""Prepare state dict metadata for IPC/ZMQ weight refitting.
114
+
115
+
Collective refit receives tensor metadata from the transfer headers.
103
116
104
117
Args:
105
118
state_dict_info (dict): A dictionary containing the info for refit.
106
119
e.g. {tensor_name: (shape, dtype)}
120
+
delta_load_batch_size_bytes (int | None): Maximum decoded delta bytes
121
+
to batch before calling vLLM load_weights. None means delta
122
+
transfer is disabled.
107
123
"""
108
-
self.state_dict_info=state_dict_info# pyrefly: ignore[implicitly-defined-attribute] This class does not define __init__ so assignments like this should be ignored
0 commit comments