[quantization] AWQ Marlin doesn't work when dtype is bfloat16 (#11494)
Signed-off-by: Kai-Hsun Chen <khchen@x.ai> Co-authored-by: Xinyuan Tong <115166877+JustinTong0323@users.noreply.github.com>
This commit is contained in:
@@ -840,12 +840,9 @@ class AWQMoEMethod(FusedMoEMethodBase):
|
||||
self.moe_runner_config.activation == "silu"
|
||||
), "Only SiLU activation is supported."
|
||||
|
||||
# The input must currently be float16
|
||||
x = dispatch_output.hidden_states
|
||||
topk_output = dispatch_output.topk_output
|
||||
|
||||
orig_dtype = x.dtype
|
||||
x = x.half()
|
||||
|
||||
topk_weights, topk_ids, router_logits = topk_output
|
||||
|
||||
|
||||
@@ -527,7 +527,7 @@ class ModelRunner:
|
||||
quantization_config := getattr(
|
||||
self.model_config.hf_config, "quantization_config", None
|
||||
)
|
||||
) is not None:
|
||||
) is not None and "weight_block_size" in quantization_config:
|
||||
weight_block_size_n = quantization_config["weight_block_size"][0]
|
||||
|
||||
if self.tp_size % self.moe_ep_size != 0:
|
||||
|
||||
Reference in New Issue
Block a user