Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add renormalize param for FusedMOE #671

Open
wants to merge 1 commit into
base: habana_main
Choose a base branch
from

Conversation

tangleintel
Copy link

@tangleintel tangleintel commented Jan 9, 2025

Add renormalize parameter for FusedMOE cause whether to normalize routing_weights depends on the norm_topk_prob attrib in model's config.json file. Some models such as Qwen2-MoE is set to false.

Note: This PR should depend on this one in vllm-hpu-extension. So pls also help review it first.

@@ -235,7 +235,7 @@ def __init__(
from vllm.model_executor.layers.quantization.inc import INCConfig
selected_fused_moe = (StaticFusedMOE if isinstance(
quant_config, INCConfig) else DynamicFusedMOE)
self.hpu_static_fused_moe = selected_fused_moe(self.num_experts)
self.hpu_static_fused_moe = selected_fused_moe(self.num_experts, renormalize=renormalize)

Choose a reason for hiding this comment

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

Hi, you will need to update sha for vllm-hpu-extension in requirements-hpu.txt when additional PR is merged

Copy link
Author

Choose a reason for hiding this comment

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

OK, thx for the reminder, I will do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants