[feature] MiniMax-M3-MXFP4 support added (#45896)

Signed-off-by: Qiang Li <qiang.li2@amd.com>
This commit is contained in:
qli88
2026-06-17 18:50:48 +00:00
committed by GitHub
parent 2a47a9ff0f
commit d112eb1ac7
4 changed files with 44 additions and 3 deletions
+12 -2
View File
@@ -924,6 +924,11 @@ class MiniMaxM3Model(nn.Module, EagleModelMixin):
class MiniMaxM3SparseForCausalLM(nn.Module, SupportsEagle3):
"""MiniMax M3 (sparse/dense backbone) for causal language modeling."""
packed_modules_mapping = {
"qkv_proj": ["q_proj", "k_proj", "v_proj"],
"gate_up_proj": ["gate_proj", "up_proj"],
}
def __init__(self, *, vllm_config: VllmConfig, prefix: str = ""):
super().__init__()
config = vllm_config.model_config.hf_text_config
@@ -987,14 +992,19 @@ class MiniMaxM3SparseForConditionalGeneration(
# ranks (see ``_process_image_input`` / ``_process_video_input``).
supports_encoder_tp_data = True
packed_modules_mapping = {
"qkv_proj": ["q_proj", "k_proj", "v_proj"],
"gate_up_proj": ["gate_proj", "up_proj"],
}
hf_to_vllm_mapper = WeightsMapper(
orig_to_new_prefix={
"multi_modal_projector.": "vision_tower.multi_modal_projector.",
"patch_merge_mlp.": "vision_tower.patch_merge_mlp.",
},
orig_to_new_substr={
".mlp.fc1.": ".fc1.",
".mlp.fc2.": ".fc2.",
".mlp.fc1": ".fc1",
".mlp.fc2": ".fc2",
},
)