[AMD] Fix DeepSeek-V4 accuracy by not passing num_token_non_padded to MoE topk (#39804)
Co-authored-by: Thomas Wang <thomawan@amd.com> Co-authored-by: HAI <hixiao@gmail.com>
This commit is contained in:
co-authored by
Thomas Wang
HAI
parent
48c3854620
commit
aa0b65c7c7
@@ -924,11 +924,14 @@ class DeepseekV2MoE(nn.Module):
|
||||
input_ids_global=input_ids_global,
|
||||
)
|
||||
|
||||
num_token_non_padded = (
|
||||
forward_batch.moe_num_token_non_padded()
|
||||
if forward_batch is not None
|
||||
else None
|
||||
)
|
||||
if _is_hip:
|
||||
num_token_non_padded = None
|
||||
else:
|
||||
num_token_non_padded = (
|
||||
forward_batch.moe_num_token_non_padded()
|
||||
if forward_batch is not None
|
||||
else None
|
||||
)
|
||||
if not self._enable_a2a_moe:
|
||||
if self._can_dual_stream_graph(hidden_states):
|
||||
fwd = get_forward()
|
||||
|
||||
Reference in New Issue
Block a user