[BugFix] Fix ModelOpt quantization inference for fused siblings (#47445)

Signed-off-by: jasonlizhengjian <jasonlizhengjian@gmail.com>
This commit is contained in:
Jason Li
2026-07-08 03:19:42 +05:00
committed by GitHub
parent c8c2f838e7
commit d99adcebdc
2 changed files with 42 additions and 0 deletions
+10
View File
@@ -957,6 +957,11 @@ class MiniMaxM3Model(nn.Module, EagleModelMixin):
class MiniMaxM3SparseForCausalLM(nn.Module, SupportsPP, 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
@@ -1024,6 +1029,11 @@ 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.",