Add model to WeightTransferEngine.__init__ (#42922)

Signed-off-by: SumanthRH <sumanthrh99@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Sumanth R Hegde
2026-05-22 17:52:15 -07:00
committed by GitHub
co-authored by mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent 552bbe6f4e
commit 3cb83c9592
7 changed files with 78 additions and 29 deletions
@@ -109,7 +109,10 @@ class NCCLWeightTransferEngine(
update_info_cls = NCCLWeightTransferUpdateInfo
def __init__(
self, config: WeightTransferConfig, parallel_config: ParallelConfig
self,
config: WeightTransferConfig,
parallel_config: ParallelConfig,
model: torch.nn.Module,
) -> None:
"""
Initialize the NCCL weight transfer engine.
@@ -117,8 +120,9 @@ class NCCLWeightTransferEngine(
Args:
config: The configuration for the weight transfer engine
parallel_config: The configuration for the parallel setup
model: The local model instance which will receive the weights
"""
super().__init__(config, parallel_config)
super().__init__(config, parallel_config, model)
self.model_update_group: PyNcclCommunicator | None = None
def init_transfer_engine(self, init_info: NCCLWeightTransferInitInfo) -> None: