bridge.models.beam.beam_provider#

Module Contents#

Classes#

BeamModelProvider

Legacy provider compatibility using the same layers and validation as the Beam builder.

API#

class bridge.models.beam.beam_provider.BeamModelProvider#

Bases: megatron.bridge.models.hybrid.hybrid_provider.HybridModelProvider, megatron.bridge.models.beam.beam_config.BeamTransformerConfig

Legacy provider compatibility using the same layers and validation as the Beam builder.

The flattened dataclass is serializable by the provider checkpoint path. New integrations should use BeamModelConfig and BeamModelBuilder.

mtp_num_layers: int | None#

None

finalize() → None#

Split pipeline stages at Beam-layer boundaries and validate the architecture.

_resolve_hybrid_stack_spec() → megatron.core.transformer.ModuleSpec#
provide(
pre_process: bool | None = None,
post_process: bool | None = None,
vp_stage: int | None = None,
) → megatron.core.models.hybrid.hybrid_model.HybridModel#

Build the Hybrid model with Beam layers and the final-logit soft cap.