[Bugfix] Fix qwen-moe packed_modules_mapping (#26634)
Signed-off-by: Jee Jee Li <pandaleefree@gmail.com>
This commit is contained in:
@@ -634,11 +634,7 @@ class Qwen3MoeForCausalLM(
|
||||
"q_proj",
|
||||
"k_proj",
|
||||
"v_proj",
|
||||
],
|
||||
"gate_up_proj": [
|
||||
"gate_proj",
|
||||
"up_proj",
|
||||
],
|
||||
]
|
||||
}
|
||||
|
||||
fall_back_to_pt_during_load = False
|
||||
@@ -649,6 +645,14 @@ class Qwen3MoeForCausalLM(
|
||||
quant_config = vllm_config.quant_config
|
||||
self.config = config
|
||||
self.quant_config = quant_config
|
||||
# Only perform the following mapping when Qwen3MoeMLP exists
|
||||
if getattr(config, "mlp_only_layers", []):
|
||||
self.packed_modules_mapping["gate_up_proj"] = (
|
||||
[
|
||||
"gate_proj",
|
||||
"up_proj",
|
||||
],
|
||||
)
|
||||
self.model = Qwen3MoeModel(
|
||||
vllm_config=vllm_config, prefix=maybe_prefix(prefix, "model")
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user