[Perf][NemotronVoiceChat] Fast defaults for all three deploy profiles: 2.8x offline, realtime full-duplex audio (#6354)
Signed-off-by: Yuekai Zhang <zhangyuekai@foxmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e43c787544
commit
4179b0cae1
22 files changed
+2606
-195
No files matched your search
@@ -2936,6 +2936,19 @@ class Orchestrator:
|
||||
next_prompt_len = max(1, compute_talker_prompt_ids_length(prompt_token_ids))
|
||||
except Exception:
|
||||
next_prompt_len = max(1, len(prompt_token_ids))
|
||||
# A stage may size its own prewarmed placeholder prompt via
|
||||
# hf_overrides.async_chunk_prewarm_prompt_len (e.g. a talker
|
||||
# whose engine positions must cover a speaker-prompt prefill;
|
||||
# the model validates the value and reports the right one on
|
||||
# mismatch).
|
||||
prewarm_len = getattr(
|
||||
getattr(next_pool.stage_vllm_config, "model_config", None),
|
||||
"hf_config",
|
||||
None,
|
||||
)
|
||||
prewarm_len = getattr(prewarm_len, "async_chunk_prewarm_prompt_len", None)
|
||||
if prewarm_len is not None and int(prewarm_len) > 1:
|
||||
next_prompt_len = int(prewarm_len)
|
||||
|
||||
original_prompt = req_state.prompt
|
||||
if isinstance(original_prompt, dict):
|
||||
|
||||
@@ -150,6 +150,7 @@ class StageEngineCoreClientBase(StageClientBase):
|
||||
self.engine_outputs: Any = None
|
||||
self.client_addresses = dict(client_addresses or {})
|
||||
self._omni_kv_config = getattr(getattr(vllm_config, "model_config", None), "omni_kv_config", None)
|
||||
self._stage_hf_config = getattr(getattr(vllm_config, "model_config", None), "hf_config", None)
|
||||
self._kv_sender_host = self._resolve_contact_host()
|
||||
self._kv_sender_info: dict[str, Any] | None = None
|
||||
self._kv_sender_initialized = False
|
||||
@@ -396,17 +397,29 @@ class StageEngineCoreClientBase(StageClientBase):
|
||||
"""
|
||||
if self.custom_process_input_func is not None:
|
||||
signature = inspect.signature(self.custom_process_input_func)
|
||||
if len(signature.parameters) >= 4:
|
||||
extra_kwargs: dict[str, Any] = {}
|
||||
if "next_stage_hf_config" in signature.parameters:
|
||||
# Let a processor size the next stage's prompt from that
|
||||
# stage's model config (e.g. a talker whose engine positions
|
||||
# must cover a speaker-prompt prefill).
|
||||
extra_kwargs["next_stage_hf_config"] = self._stage_hf_config
|
||||
# Match the context parameter by name, including the
|
||||
# underscore-prefixed spelling some processors use (e.g.
|
||||
# MiniCPM-o's ``llm2tts(..., _streaming_context)``), so bridge
|
||||
# state keeps flowing to them.
|
||||
if "streaming_context" in signature.parameters or "_streaming_context" in signature.parameters:
|
||||
return self.custom_process_input_func(
|
||||
source_outputs,
|
||||
prompt,
|
||||
self.requires_multimodal_data,
|
||||
streaming_context,
|
||||
**extra_kwargs,
|
||||
)
|
||||
return self.custom_process_input_func(
|
||||
source_outputs,
|
||||
prompt,
|
||||
self.requires_multimodal_data,
|
||||
**extra_kwargs,
|
||||
)
|
||||
|
||||
if not self.engine_input_source:
|
||||
|
||||
Reference in new issue
Block a user