Fix shared experts fusion error without quantization (#5632)

This commit is contained in:
lambert0312
2025-04-23 00:22:26 +08:00
committed by GitHub
parent 70d040f904
commit 76d17c7ecb

View File

@@ -1604,7 +1604,7 @@ class DeepseekV2ForCausalLM(nn.Module):
if self.n_share_experts_fusion > 0:
weights_list = list(weights)
weights_dict = dict(weights_list)
if self.quant_config.get_name() == "w8a8_int8":
if self.quant_config is None or self.quant_config.get_name() == "w8a8_int8":
suffix_list = [
"down_proj.weight",
"down_proj.weight_scale",