From df1d046de2a1ac47ef4f1c99b37b3e59feff95e1 Mon Sep 17 00:00:00 2001 From: Trevor Morris Date: Wed, 18 Mar 2026 14:10:01 -0700 Subject: [PATCH] Add packed_modules_mapping for MiniMax-M2 (#19995) --- python/sglang/srt/models/minimax_m2.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/python/sglang/srt/models/minimax_m2.py b/python/sglang/srt/models/minimax_m2.py index 9b50d3d07..30815d8fa 100644 --- a/python/sglang/srt/models/minimax_m2.py +++ b/python/sglang/srt/models/minimax_m2.py @@ -942,6 +942,18 @@ class MiniMaxM2Model(nn.Module): class MiniMaxM2ForCausalLM(nn.Module): """MiniMax M2 model 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, config: PretrainedConfig,