nemo_automodel.components.models.step5.parallelization
nemo_automodel.components.models.step5.parallelization
FSDP sidecar that keeps the Step 5 final norm in an FP32 unit.
Module Contents
Classes
Data
API
Bases: ModelParallelizer
Keep the final decoder norm in its own FP32 FSDP unit.
Shard a module, first giving any contained final norm an FP32 unit.
Decoder blocks already group their strict-FP32 norms by dtype. The final norm is owned by the root unit, which uses the BF16 parameter policy, so it is wrapped separately before that root.
Parameters:
module
Module to shard in place.
**kwargs
fully_shard keyword arguments (mesh, mp_policy,
offload_policy, reshard_after_forward, ignored_params).
Returns: nn.Module
The input module with FSDP applied.