[BugFix] Fix stage engine outputs mismatch bug in online batching (#691)

Signed-off-by: ZeldaHuang <hzm414167@alibaba-inc.com>
This commit is contained in:
Ziming Huang authored and GitHub committed 2026-01-09 04:01:57 +13:00
1 parent 4c72b67444
commit cddcc400d3
2 files changed
+8 -3

No files matched your search

@@ -651,7 +651,11 @@ class Qwen3OmniMoeForConditionalGeneration(
)
inputs_embeds = summed_embeddings.clone()
else:
code_predictor_codes = torch.zeros((0, self.talker.num_code_groups), dtype=torch.long)
code_predictor_codes = torch.zeros(
(inputs_embeds.shape[0], self.talker.num_code_groups),
device=self._module_device(self.talker),
dtype=torch.long,
)
inputs_embeds = (inputs_embeds + text_step).reshape(-1, self.talker_config.text_config.hidden_size)
return inputs_embeds, code_predictor_codes.squeeze(-1).detach().to("cpu").contiguous()