fix bug for EP+MTP (#5605)

Co-authored-by: lizan1999 <lizan03@baidu.com>
This commit is contained in:
lizan1999
2025-12-18 14:34:54 +08:00
committed by GitHub
parent d8587e987e
commit e1a9b282eb
3 changed files with 38 additions and 42 deletions

View File

@@ -732,14 +732,6 @@ class MTPProposer(Proposer):
for attn_backend in self.attn_backends:
attn_backend.init_attention_metadata(self.forward_meta)
# Mix ep in single node
if self.fd_config.parallel_config.use_ep and self.fd_config.scheduler_config.splitwise_role == "mixed":
only_decode_batch_list = []
prefill_exists = self.exist_prefill()
paddle.distributed.all_gather_object(only_decode_batch_list, not prefill_exists)
only_decode_batch = all(only_decode_batch_list)
self.fd_config.model_config.moe_phase.phase = "decode" if only_decode_batch else "prefill"
def exist_prefill(self):
"""
check whether prefill stage exist