Unverified Commit 37367da6 authored by Xiaoyu Zhang's avatar Xiaoyu Zhang Committed by GitHub
Browse files

[fix CI] Fix logical condition in fused MoE layer for compressed tensor quantization (#10299)

parent ef959d7b
...@@ -613,8 +613,10 @@ class FusedMoE(torch.nn.Module): ...@@ -613,8 +613,10 @@ class FusedMoE(torch.nn.Module):
loaded_weight = loaded_weight.to(param.data.device) loaded_weight = loaded_weight.to(param.data.device)
if ( if (
"compressed" in self.quant_method.__class__.__name__.lower() (
or "w4afp8" in self.quant_config.get_name() "compressed" in self.quant_method.__class__.__name__.lower()
or "w4afp8" in self.quant_config.get_name()
)
and (param.data[expert_id] != 1).any() and (param.data[expert_id] != 1).any()
and ((param.data[expert_id] - loaded_weight).abs() > 1e-5).any() and ((param.data[expert_id] - loaded_weight).abs() > 1e-5).any()
): ):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment