nemo_automodel.components.distributed.ddp
nemo_automodel.components.distributed.ddp
Module Contents
Classes
Functions
Data
API
Deprecated compatibility wrapper for PyTorch DDP.
.. deprecated:: 0.7
Pass DDPConfig through the config-driven infrastructure and
provide model-specific behavior with ModelParallelizer. This
compatibility class is scheduled for removal in 0.8.
This manager wraps models with DistributedDataParallel for data-parallel distributed training.
Parameters:
Configuration for DDP distributed training.
Initialize device configuration for DDP.
Sets the rank, world_size, and device based on the process group backend.
Wraps the given model with DistributedDataParallel (DDP).
Moves the model to the initialized device before wrapping. For CUDA devices, the device id is passed to DDP as device_ids; for CPU, no device ids are provided.
Parameters:
The PyTorch model to be wrapped.
Optional callback that re-resolves parameter trainability after model surgery and before DDP construction.
Returns: torch.nn.Module
torch.nn.parallel.DistributedDataParallel: The DDP-wrapped model.
Validate distributed state and return the device owned by this rank.
Apply activation checkpointing and PyTorch DDP from a typed config.