[BugFix] Fix stage engine outputs mismatch bug in online batching (#691)
Signed-off-by: ZeldaHuang <hzm414167@alibaba-inc.com>
This commit is contained in:
1 parent
4c72b67444
commit
cddcc400d3
2 files changed
+8
-3
No files matched your search
@@ -360,7 +360,6 @@ class AsyncOmni(OmniBase):
|
||||
raise RuntimeError(result) # Request Finished due to error
|
||||
|
||||
engine_outputs = _load(result, obj_key="engine_outputs", shm_key="engine_outputs_shm")
|
||||
stage.set_engine_outputs(engine_outputs)
|
||||
if isinstance(engine_outputs, list):
|
||||
engine_outputs = engine_outputs[0]
|
||||
finished = engine_outputs.finished
|
||||
@@ -419,7 +418,9 @@ class AsyncOmni(OmniBase):
|
||||
final_output_type=stage.final_output_type,
|
||||
request_output=engine_outputs,
|
||||
)
|
||||
|
||||
if not isinstance(engine_outputs, list):
|
||||
engine_outputs = [engine_outputs]
|
||||
stage.set_engine_outputs(engine_outputs)
|
||||
# Forward to next stage if there is one
|
||||
next_stage_id = stage_id + 1
|
||||
if next_stage_id <= final_stage_id_for_e2e and finished:
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
Reference in new issue
Block a user