nemo_automodel.components.models.glm5_next.parallelization
nemo_automodel.components.models.glm5_next.parallelization
Keep GLM-5.3’s tiny FP32 holders gathered between forward and backward.
Module Contents
Classes
Data
API
Bases: ModelParallelizer
Retain native FSDP gradient reduction for gathered FP32 holders.
Apply FSDP, retaining only the small model-owned FP32 holders.
Parameters:
module
Native module to shard. Only the mHC and KDA FP32 parameter holders override the caller’s reshard policy.
mesh
Existing FSDP mesh, unchanged for holder parameters.
mp_policy
Existing compute/reduction precision policy.
offload_policy
Existing parameter/gradient offload policy.
reshard_after_forward
Caller policy for every non-holder module.
ignored_params
Parameters already owned by another parallelism boundary; their membership is preserved.
Returns: nn.Module
The module wrapped by the native FSDP2 primitive.