[Feature] Support Async Omni output materialization (#4476)

Signed-off-by: Chenguang ZHENG <645327136@qq.com>
Signed-off-by: amy-why-3459 <wuhaiyan17@huawei.com>
Co-authored-by: amy-why-3459 <wuhaiyan17@huawei.com>
This commit is contained in:
Chenguang Zhengandamy-why-3459 authored and GitHub committed 2026-06-22 16:07:07 +00:00
1 parent 8a6786731e
commit eaa16e1941
5 files changed
+1131 -195

No files matched your search

@@ -105,6 +105,7 @@ class Qwen3OmniMoeForConditionalGeneration(
self.have_multimodal_outputs = True
self.has_preprocess = False
self.has_postprocess = False
self.use_async_omni_output = False
config: Qwen3OmniMoeConfig = vllm_config.model_config.hf_config
multimodal_config = vllm_config.model_config.multimodal_config
@@ -129,6 +130,7 @@ class Qwen3OmniMoeForConditionalGeneration(
self.model_stage = vllm_config.model_config.model_stage
if self.model_stage == "thinker":
self.use_async_omni_output = True
# Initialize thinker model (multimodal processing + text generation)
# Create a new vllm_config with thinker_config as the hf_config
thinker_vllm_config = vllm_config.with_hf_config(
@@ -152,6 +154,13 @@ class Qwen3OmniMoeForConditionalGeneration(
multimodal_config.skip_mm_profiling = True
self.has_preprocess = True
self.has_postprocess = True
# Talker only ships codec codes to code2wav; skip latent hidden D2H.
# Build Omni output asynchronously like thinker, but run lightweight
# postprocess eagerly so hidden_states.last stays on GPU before the
# next decode step.
self.use_async_omni_output = True
self.eager_omni_postprocess_before_async_output = True
self.omni_pooler_payload_include_hidden = False
self.set_custom_preprocess(self.talker_preprocess)
self.set_custom_postprocess(self.talker_postprocess)
self.thinker = None