bridge.models.glm.glm_moe_mappings#

GLM MoE mapping helpers for fused expert weights.

These are thin aliases around the shared FusedExpertMapping / FusedGatedExpertMapping classes in param_mapping.py. Kept for backwards compatibility with existing imports.

Module Contents#

Classes#

GLMExpertDownProjMapping

FusedExpertMapping for GLM down-projection expert weights.

API#

class bridge.models.glm.glm_moe_mappings.GLMExpertDownProjMapping(
megatron_param: str,
hf_param: str,
permute_dims: tuple[int, ...] | None = None,
transpose_on_export: bool = False,
)#

Bases: megatron.bridge.models.conversion.param_mapping.FusedExpertMapping

FusedExpertMapping for GLM down-projection expert weights.

Grouped-export transpose is disabled for the current GLM fused-expert export paths. The per-expert tensors are already in HF layout by the time they are stacked into the fused expert weight, so applying an additional grouped- export transpose would produce the wrong orientation.

Initialization