[FIX] trtllm-moe-fp4-renorm for Qwen series models (#14350)
This commit is contained in:
@@ -1126,12 +1126,16 @@ class FlashInferFP4MoE(FusedMoE):
|
||||
topk_config = topk_output.topk_config
|
||||
|
||||
hs_fp4, hs_scale_linear = self._quantize_hidden_states_fp4(hidden_states)
|
||||
router_logits = router_logits.to(torch.float32)
|
||||
routing_method_type = self.routing_method_type
|
||||
assert (
|
||||
routing_method_type is not None
|
||||
), "flashinfer trtllm moe nvfp4 backend has not been adapted for the current moe layer, you can set routing_method_type (See definition of RoutingMethodType please) for the moe layer explicitly for a quick adaptation."
|
||||
|
||||
# DeepSeekV3 style routing requires float32 router logits,
|
||||
# see this PR for details: https://github.com/flashinfer-ai/flashinfer/commit/d84e1d560da0a27961c19ca788d96c19cb9dcfb6
|
||||
if routing_method_type == RoutingMethodType.DeepSeekV3:
|
||||
router_logits = router_logits.to(torch.float32)
|
||||
|
||||
correction_bias = (
|
||||
None
|
||||
if topk_config.correction_bias is None
|
||||
|
||||
@@ -1261,7 +1261,6 @@ class ServerArgs:
|
||||
)
|
||||
self.disable_overlap_schedule = True
|
||||
if is_sm100_supported():
|
||||
self.attention_backend = "triton"
|
||||
quantization_config = getattr(hf_config, "quantization_config", None)
|
||||
quant_method = (
|
||||
quantization_config.get("quant_method")
|
||||
|
||||
Reference in New Issue
Block a user