nemo_automodel.components.distributed.ddp
nemo_automodel.components.distributed.ddp
Module Contents
Classes
Data
API
Manager for distributed training using PyTorch’s DDP.
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.