[BugFix] Fix ModelOpt quantization inference for fused siblings (#47445)
Signed-off-by: jasonlizhengjian <jasonlizhengjian@gmail.com>
This commit is contained in:
@@ -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.",
|
||||
|
||||
Reference in New Issue
Block a user