[NPU]revert add scoring func for GLM 4.7 Flash (#31388)
This commit is contained in:
@@ -97,7 +97,7 @@ def fused_topk_npu(
|
|||||||
group_select_mode=(1 if use_grouped_topk else 0),
|
group_select_mode=(1 if use_grouped_topk else 0),
|
||||||
renorm=0,
|
renorm=0,
|
||||||
# 1 for sigmoid, 0 for softmax
|
# 1 for sigmoid, 0 for softmax
|
||||||
norm_type=(0 if topk_config.scoring_func == "softmax" else 1),
|
norm_type=1,
|
||||||
routed_scaling_factor=(
|
routed_scaling_factor=(
|
||||||
topk_config.routed_scaling_factor
|
topk_config.routed_scaling_factor
|
||||||
if topk_config.apply_routed_scaling_factor_on_output
|
if topk_config.apply_routed_scaling_factor_on_output
|
||||||
|
|||||||
@@ -225,7 +225,6 @@ class Glm4MoeLiteSparseMoeBlock(nn.Module):
|
|||||||
quant_config=quant_config,
|
quant_config=quant_config,
|
||||||
routed_scaling_factor=self.routed_scaling_factor,
|
routed_scaling_factor=self.routed_scaling_factor,
|
||||||
prefix=add_prefix("experts", prefix),
|
prefix=add_prefix("experts", prefix),
|
||||||
**({"scoring_func": "sigmoid"}),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
self.topk = TopK(
|
self.topk = TopK(
|
||||||
|
|||||||
Reference in New Issue
Block a user