bridge.training.gtp#
Generalized Tensor Parallelism helpers for the standard Bridge runtime.
Module Contents#
Functions#
Return the MCore transformer config nested in a Bridge model config. |
|
Return whether dense or expert GTP weight rematerialization is enabled. |
|
Configure process-global GTP state before constructing model modules. |
|
Classify all model chunks after distributed wrapping and before first forward. |
|
Return the group spanning every rank that consumes distinct input data. |
API#
- bridge.training.gtp.get_transformer_config(model_config: Any) Any#
Return the MCore transformer config nested in a Bridge model config.
- bridge.training.gtp.is_gtp_remat_active(model_config: Any) bool#
Return whether dense or expert GTP weight rematerialization is enabled.
- bridge.training.gtp.configure_gtp_remat(model_config: Any) None#
Configure process-global GTP state before constructing model modules.
- bridge.training.gtp.classify_gtp_remat_chains(
- model: list[torch.nn.Module],
- model_config: Any,
Classify all model chunks after distributed wrapping and before first forward.
- bridge.training.gtp.get_data_distribution_group(
- pg_collection: megatron.core.process_groups_config.ProcessGroupCollection,
- model_config: Any,
- *,
- with_context_parallel: bool = False,
Return the group spanning every rank that consumes distinct input data.