bridge.models.glm_moe_dsa.glm5_config#
Builder-backed model config for the GLM-5 DSA family.
Module Contents#
Classes#
GLM-5 as DSA, dense and MoE Hybrid layers with MLA, the builder counterpart of |
|
Build GLM-5 stages from GLM’s Hybrid stack spec, as |
Data#
API#
- class bridge.models.glm_moe_dsa.glm5_config.GLM5ModelConfig#
Bases:
megatron.bridge.models.hybrid.model_config.BridgeHybridMLAModelConfigGLM-5 as DSA, dense and MoE Hybrid layers with MLA, the builder counterpart of
GLM5ModelProvider.validate()checks GLM’s physical layout and training settings without changing the config.finalize()then places DSA-aligned pipeline boundaries inhybrid_layer_patternand derives the MTP pattern and MoE layer schedule, as the provider does, before the Hybrid finalization.- builder: ClassVar[str]#
‘megatron.bridge.models.glm_moe_dsa.glm5_config.GLM5ModelBuilder’
- validate() None#
Check the Hybrid settings and GLM’s physical layout without changing the config.
- finalize() None#
Validate, then preserve DSA sharing within each pipeline stage and derive GLM’s layer settings.
- class bridge.models.glm_moe_dsa.glm5_config.GLM5ModelBuilder#
Bases:
megatron.bridge.models.hybrid.BridgeHybridModelBuilderBuild GLM-5 stages from GLM’s Hybrid stack spec, as
GLM5ModelProviderdoes.The spec isolates DSA index-sharing state per forward and replays a whole stage on recomputation. Like the provider, the builder uses it regardless of
hybrid_stack_spec.- build_distributed_models(
- pg_collection: megatron.core.process_groups_config.ProcessGroupCollection,
- *args: Any,
- **kwargs: Any,
Register DSA metric setup for the complete list of wrapped model chunks.
- _resolve_hybrid_stack_spec() megatron.core.transformer.spec_utils.ModuleSpec#
Return GLM’s Hybrid stack spec.
- bridge.models.glm_moe_dsa.glm5_config.__all__#
[‘GLM5ModelBuilder’, ‘GLM5ModelConfig’]