Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion auto_round/utils/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,8 @@ def is_moe_layer(module: torch.nn.Module) -> bool:
"DeepseekV3MoE".lower(),
"Qwen2MoeSparseMoeBlock".lower(),
"Qwen3MoeSparseMoeBlock".lower(),
"Qwen3NextSparseMoeBlock".lower(),
"Qwen3VLMoeTextSparseMoeBlock".lower(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this change is intended to support NVFP quantization for Qwen3VLMoE&Qwen3Next, please also verify VLLM generation, thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, this PR is necessary since some experts are not calibrated and act_max is missing.

]
)

Expand Down Expand Up @@ -722,7 +724,16 @@ def module_match_name_list(module, name_list):
return any(name.lower() in type(module).__name__.lower() for name in name_list)

if module_match_name_list(
module, ["Qwen2MoeSparseMoeBlock", "Qwen3MoeSparseMoeBlock", "DeepseekMoE", "DeepseekV2MoE", "DeepseekV3MoE"]
module,
[
"Qwen2MoeSparseMoeBlock",
"Qwen3MoeSparseMoeBlock",
"Qwen3NextSparseMoeBlock",
"Qwen3VLMoeTextSparseMoeBlock",
"DeepseekMoE",
"DeepseekV2MoE",
"DeepseekV3MoE",
],
):
return ["gate_proj", "down_proj", "up_proj"]
elif module_match_name_list(module, ["MixtralMoeSparseMoeBlock"]):
Expand Down