bridge.models.minimax_m3.minimax_m3_config#
Builder-backed model configs for MiniMax-M3.
MiniMaxM3VLModelConfig: the complete vision-language model the released checkpoint ships, built by
MiniMaxM3VLModelBuilder.
MiniMaxM3ModelConfig: the sparse-MoE language model alone, built by MiniMaxM3ModelBuilder. The
text pretraining and SFT recipes use it.
MiniMaxM3VLModel reads the vision config, the token IDs, the projector shape and the Lightning
Indexer layout from the config it is built with, as it does from a provider, so the
vision-language transformer config declares them. The other vision-language settings live on the
outer config.
Module Contents#
Classes#
Builder config for the MiniMax-M3 sparse-MoE language model. |
|
Language-model fields plus the vision-language fields |
|
Builder config for the complete MiniMax-M3 vision-language model. |
Data#
API#
- class bridge.models.minimax_m3.minimax_m3_config.MiniMaxM3ModelConfig#
Bases:
megatron.bridge.models.gpt.model_config.BridgeGPTModelConfigBuilder config for the MiniMax-M3 sparse-MoE language model.
MiniMaxM3ModelBuilderkeeps the router weights in FP32, as the checkpoint stores them.- builder: ClassVar[str]#
‘megatron.bridge.models.minimax_m3.minimax_m3_builder.MiniMaxM3ModelBuilder’
- class bridge.models.minimax_m3.minimax_m3_config.MiniMaxM3VLTransformerConfig#
Bases:
megatron.bridge.models.transformer_config.TransformerConfigLanguage-model fields plus the vision-language fields
MiniMaxM3VLModelreads.- vision_config: Any#
None
Hugging Face vision config of the checkpoint.
- image_token_id: int#
200025
- video_token_id: int#
200026
6144
- multimodal_projector_bias: bool#
True
- spatial_merge_size: int#
2
- lightning_indexer_layers: list[int]#
‘field(…)’
Decoder layers whose Lightning Indexer weights the model keeps as frozen state.
- index_n_heads: int#
4
- index_head_dim: int#
128
- class bridge.models.minimax_m3.minimax_m3_config.MiniMaxM3VLModelConfig#
Bases:
bridge.models.minimax_m3.minimax_m3_config.MiniMaxM3ModelConfigBuilder config for the complete MiniMax-M3 vision-language model.
MiniMaxM3VLModelmerges image features into the language embeddings before it scatters them for sequence parallelism, so the language model’s embedding does not scatter them.- builder: ClassVar[str]#
‘megatron.bridge.models.minimax_m3.minimax_m3_builder.MiniMaxM3VLModelBuilder’
- transformer_config_class: ClassVar[type[megatron.bridge.models.transformer_config.TransformerConfig]]#
None
- scatter_embedding_sequence_parallel: bool#
False
- hf_config_dict: dict[str, Any]#
‘field(…)’
The source Hugging Face config, which export starts from.
- temporal_patch_size: int#
2
- freeze_language_model: bool#
False
- freeze_vision_model: bool#
False
- freeze_vision_projection: bool#
False
- property special_token_ids: dict[str, int]#
Return the token IDs used by multimodal data pipelines.
- to_text_config() bridge.models.minimax_m3.minimax_m3_config.MiniMaxM3ModelConfig#
Return the equivalent language-model config.
The text pretraining and SFT recipes build the language model alone, which keeps the native checkpoint keys of the language model.
- as_dict() dict[str, Any]#
Serialize the config, with the Hugging Face vision config in Hugging Face’s own form.
Field-by-field serialization keeps only a Hugging Face config’s declared fields. The checkpoint’s config sets the vision tower’s shape as undeclared attributes, for example on a generic
PretrainedConfigwhen loaded with remote code, so it would not survive.
- classmethod from_dict(
- data: dict[str, Any],
Deserialize a config, restoring the Hugging Face vision config with its
from_dict().
- bridge.models.minimax_m3.minimax_m3_config.__all__#
[‘MiniMaxM3ModelConfig’, ‘MiniMaxM3VLModelConfig’, ‘MiniMaxM3VLTransformerConfig’]