[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
@@ -2,6 +2,23 @@
|
||||
# 3 stages on one GPU: thinker (NemotronH AR) -> talker (EAR-TTS AR) -> code2wav
|
||||
# (RVQ-VAE decode). thinker->talker is token-path only; talker->code2wav ships
|
||||
# the [frames, 31] code stack via the shared-memory connector.
|
||||
#
|
||||
# The default is the FAST profile (2.8x on the acceptance fixture, 10.3 s ->
|
||||
# 3.65 s / RTF 0.23 on 1x H100): a bf16 + CUDA-graph thinker and the talker's
|
||||
# Gemma3 backbone running as a native vLLM model (PagedAttention KV + vLLM
|
||||
# decode CUDA graphs, MoG sampling in one captured graph) — the way NVIDIA's
|
||||
# own deployment serves EAR-TTS. Every fast setting is marked with a
|
||||
# "PARITY:" comment; apply those edits to bit-match the eager fp32 NeMo
|
||||
# reference (196/196 token parity, md5-anchored WAV on the acceptance
|
||||
# fixture).
|
||||
#
|
||||
# Notes on the native talker:
|
||||
# * classifier-free guidance is OFF by default (a paired ASR study over 4
|
||||
# fixtures at this checkpoint's guidance_scale=0.2 found no systematic
|
||||
# difference). Opt in via hf_overrides.native_talker_guidance below.
|
||||
# * the talker's engine prompt covers the speaker-prompt prefill
|
||||
# (hf_overrides.talker_init_len; 37 for the shipped "Aria" speaker). The
|
||||
# talker validates the value and reports the right one on mismatch.
|
||||
pipeline: nemotron_voicechat
|
||||
async_chunk: false
|
||||
|
||||
@@ -15,19 +32,19 @@ stages:
|
||||
- stage_id: 0 # thinker: speech -> frame-locked text (final text output)
|
||||
max_num_seqs: 1
|
||||
gpu_memory_utilization: 0.62
|
||||
enforce_eager: true
|
||||
# PARITY: set enforce_eager: true and dtype: float32. bf16 + CUDA graphs
|
||||
# is ~4x faster per frame and halves the weights (~43 GB -> ~21 GB); its
|
||||
# greedy text can legitimately diverge from the fp32 reference (measured
|
||||
# within one word on the acceptance fixture, ASR-clean).
|
||||
enforce_eager: false
|
||||
dtype: bfloat16
|
||||
# NemotronH mamba SSM state in fp32 (matches NVIDIA's own vLLM deployment
|
||||
# of this model; bf16 SSM state accumulates drift over long sequences).
|
||||
mamba_ssm_cache_dtype: float32
|
||||
enable_prefix_caching: false
|
||||
async_scheduling: false
|
||||
max_num_batched_tokens: 8192
|
||||
max_model_len: 8192
|
||||
# fp32 matches the NeMo reference exactly (196/196 token parity on the
|
||||
# acceptance fixture). bf16 is ~2x faster and measured within one word of
|
||||
# the reference on the same fixture — flip to bfloat16 if you prefer speed
|
||||
# over exact parity.
|
||||
dtype: float32
|
||||
# NemotronH mamba SSM state in fp32 (matches NVIDIA's own vLLM deployment
|
||||
# of this model; bf16 SSM state accumulates drift over long sequences).
|
||||
mamba_ssm_cache_dtype: float32
|
||||
devices: "0"
|
||||
default_sampling_params:
|
||||
# Greedy, frame-locked: the example sets max_tokens to the
|
||||
@@ -39,7 +56,11 @@ stages:
|
||||
- stage_id: 1 # talker: text timeline -> 31-quantizer code stacks
|
||||
max_num_seqs: 1
|
||||
gpu_memory_utilization: 0.12
|
||||
enforce_eager: true
|
||||
# PARITY: set enforce_eager: true and delete the hf_overrides block. The
|
||||
# vendored eager fp32 EAR-TTS step is the NeMo-bit-exact path; the native
|
||||
# backbone replays the same math on PagedAttention with fresh
|
||||
# CUDA-graph-safe RNG draws (audio equivalent, not bit-identical).
|
||||
enforce_eager: false
|
||||
enable_prefix_caching: false
|
||||
async_scheduling: false
|
||||
skip_tokenizer_init: true
|
||||
@@ -49,15 +70,26 @@ stages:
|
||||
# fp32 buffers into the forward, and 1B params in fp32 are cheap.
|
||||
dtype: float32
|
||||
devices: "0"
|
||||
hf_overrides:
|
||||
use_native_talker: true
|
||||
talker_init_len: 37
|
||||
# Classifier-free guidance (checkpoint guidance_scale=0.2): mirrors the
|
||||
# stream on the vendored HF backbone (captured StaticCache step) and
|
||||
# blends per NeMo's generate_step math. 196-frame fixture: 3.65 s ->
|
||||
# 5.3 s (RTF 0.23 -> 0.34). Requires gpu_memory_utilization ~0.18 on
|
||||
# this stage (the vendored backbone copy stays loaded). Off by default:
|
||||
# measured ASR-equivalent at this checkpoint's scale.
|
||||
# native_talker_guidance: true
|
||||
output_connectors:
|
||||
to_stage_2: connector_of_shared_memory
|
||||
default_sampling_params:
|
||||
# Placeholder-token loop; the stage emits stop token 1 after the last
|
||||
# timeline position. 16383 (not 16384): the request also carries one
|
||||
# placeholder prompt token, and prompt + max_tokens must fit
|
||||
# timeline position. 16347 = max_model_len (16384) minus the native
|
||||
# talker's 37-token speaker-prompt prefill: the request carries the
|
||||
# placeholder prompt tokens, and prompt + max_tokens must fit
|
||||
# max_model_len.
|
||||
temperature: 0.0
|
||||
max_tokens: 16383
|
||||
max_tokens: 16347
|
||||
stop_token_ids: [1]
|
||||
detokenize: false
|
||||
seed: 0
|
||||
|
||||
@@ -3,6 +3,35 @@
|
||||
# One scheduler segment consumes one 1280-sample (80 ms) microphone frame.
|
||||
# Stage 0 remains one resumable request, so its NemotronH KV/Mamba state is
|
||||
# preserved between frame appends. Stage 1 and the codec overlap per frame.
|
||||
#
|
||||
# The default is the FAST profile (TTFP 712 ms -> 408 ms and realtime audio
|
||||
# delivery — one 80 ms packet per frame, median inter-chunk gap ~81 ms,
|
||||
# RTF ~1.01 on the bundled turn_taking fixture, 1x H100): the thinker runs
|
||||
# bf16 + CUDA graphs (inherited from the streaming base) and the talker's
|
||||
# Gemma3 backbone runs as a native vLLM model on PagedAttention, so the
|
||||
# duplex session length is unbounded (no StaticCache bucket cap) and the
|
||||
# per-frame talker cost drops below the vendored step. Every fast setting is
|
||||
# marked with a "PARITY:" comment here and in the streaming base; apply those
|
||||
# edits for the eager fp32 reference execution.
|
||||
#
|
||||
# Native-talker semantics:
|
||||
# * stage 1 sets max_num_batched_tokens: 64 so the speaker-prompt prefill
|
||||
# (hf_overrides.talker_init_len positions, embeddings precomputed — no
|
||||
# step-to-step feedback) runs as ONE chunked prefill at session start.
|
||||
# The per-frame code feedback IS strictly sequential, so the
|
||||
# thinker->talker producer ships at most one new timeline token per
|
||||
# chunk (drip; see thinker2talker_async_chunk) — at most one timeline
|
||||
# position is ever schedulable per engine step.
|
||||
# * the connector extra `native_talker: true` makes the thinker->talker
|
||||
# producer append one engine position PER NEW timeline token (engine
|
||||
# positions map 1:1 onto timeline steps).
|
||||
# * matching NeMo's realtime pipeline, the talker never sees the system
|
||||
# prompt (it conditions the thinker only); the duplex timeline is one
|
||||
# anchor PAD + the per-frame text tokens.
|
||||
# * classifier-free guidance is OFF by default (measured ASR-equivalent at
|
||||
# this checkpoint's guidance_scale=0.2); opt in via
|
||||
# hf_overrides.native_talker_guidance below (duplex pacing stays
|
||||
# realtime with it on).
|
||||
base_config: nemotron_labs_voicechat_streaming.yaml
|
||||
pipeline: nemotron_voicechat
|
||||
session_mode: duplex
|
||||
@@ -18,6 +47,10 @@ duplex_session:
|
||||
max_pending_turns_per_session: 4
|
||||
max_sessions: 1
|
||||
completed_append_cache_size: 256
|
||||
# Startup warmup: run two silent frames through a throwaway session before
|
||||
# real clients are admitted, so one-time costs (kernel JIT, first
|
||||
# prefill/decode paths, codec caches) never land on the first user.
|
||||
warmup_frames: 2
|
||||
|
||||
async_chunk: true
|
||||
|
||||
@@ -27,6 +60,10 @@ connectors:
|
||||
extra:
|
||||
shm_threshold_bytes: 65536
|
||||
codec_chunk_frames: 1
|
||||
# PARITY: delete this line together with the stage-1 hf_overrides
|
||||
# below (the vendored talker drains chunks model-side and keeps the
|
||||
# 1-position-per-chunk default).
|
||||
native_talker: true
|
||||
|
||||
stages:
|
||||
- stage_id: 0
|
||||
@@ -41,6 +78,22 @@ stages:
|
||||
- stage_id: 1
|
||||
max_num_seqs: 1
|
||||
async_scheduling: false
|
||||
# PARITY: set enforce_eager: true, delete max_num_batched_tokens and the
|
||||
# hf_overrides block (and the connector's native_talker flag above) for
|
||||
# the vendored eager talker of the reference duplex deployment.
|
||||
enforce_eager: false
|
||||
max_num_batched_tokens: 64
|
||||
hf_overrides:
|
||||
use_native_talker: true
|
||||
talker_init_len: 37
|
||||
# The prewarmed placeholder prompt must cover the speaker-prompt
|
||||
# prefill positions (read by the orchestrator's async-chunk prewarm).
|
||||
async_chunk_prewarm_prompt_len: 37
|
||||
# Classifier-free guidance: mirrors the stream on the vendored HF
|
||||
# backbone (captured StaticCache step) and blends per NeMo's
|
||||
# generate_step math (~+8.5 ms/frame, still realtime). Requires
|
||||
# gpu_memory_utilization ~0.18 on this stage.
|
||||
# native_talker_guidance: true
|
||||
|
||||
- stage_id: 2
|
||||
max_num_seqs: 1
|
||||
|
||||
@@ -9,9 +9,12 @@
|
||||
# seam-free. First audio arrives after ~codec_chunk_frames thinker steps
|
||||
# instead of after the whole pipeline completes.
|
||||
#
|
||||
# The non-streaming yaml remains the parity-acceptance path (bit-exact WAV);
|
||||
# streamed audio is validated by ASR/WER instead (prefix decodes are not
|
||||
# bit-identical to the one-shot decode of the final stack).
|
||||
# The default is the FAST profile (TTFP 1.47 s / RTF 0.33 on the 196-frame
|
||||
# fixture, 1x H100): bf16 + CUDA-graph thinker, CUDA-graph EAR-TTS talker
|
||||
# step, and incremental codec decode. Every fast setting is marked with a
|
||||
# "PARITY:" comment; apply those edits for the eager fp32 reference
|
||||
# execution. Streamed audio is validated by ASR/WER, not bit parity (prefix
|
||||
# decodes are not bit-identical to the one-shot decode of the final stack).
|
||||
pipeline: nemotron_voicechat
|
||||
async_chunk: true
|
||||
|
||||
@@ -21,19 +24,25 @@ connectors:
|
||||
extra:
|
||||
shm_threshold_bytes: 65536
|
||||
# Streaming cadence for talker -> code2wav: emit a chunk once this many
|
||||
# NEW frames (80 ms each) have accumulated; ~1 s of audio per chunk.
|
||||
codec_chunk_frames: 13
|
||||
# NEW frames (80 ms each) have accumulated (5 frames = 0.4 s of audio).
|
||||
# Small chunks are cheap because the incremental codec cache decodes
|
||||
# only each chunk's new frames; on the 196-frame fixture 5-frame chunks
|
||||
# cut TTFP by ~0.4 s vs 13-frame chunks at unchanged total time.
|
||||
# PARITY: 13 (~1 s per chunk) was the reference cadence.
|
||||
codec_chunk_frames: 5
|
||||
|
||||
stages:
|
||||
- stage_id: 0 # thinker: speech -> frame-locked text (final text output)
|
||||
max_num_seqs: 1
|
||||
gpu_memory_utilization: 0.62
|
||||
enforce_eager: true
|
||||
# PARITY: set enforce_eager: true and dtype: float32 for the fp32
|
||||
# reference thinker (greedy text can legitimately diverge under bf16).
|
||||
enforce_eager: false
|
||||
enable_prefix_caching: false
|
||||
async_scheduling: false
|
||||
max_num_batched_tokens: 8192
|
||||
max_model_len: 8192
|
||||
dtype: float32
|
||||
dtype: bfloat16
|
||||
mamba_ssm_cache_dtype: float32
|
||||
devices: "0"
|
||||
output_connectors:
|
||||
@@ -54,6 +63,12 @@ stages:
|
||||
max_model_len: 16384
|
||||
dtype: float32
|
||||
devices: "0"
|
||||
hf_overrides:
|
||||
# Capture the vendored per-frame EAR-TTS step (backbone + MoG, CFG
|
||||
# batch layout) into CUDA graphs (~3x per-frame). PARITY: delete this
|
||||
# block for the eager reference step (bit-exact vs NeMo).
|
||||
use_talker_cuda_graphs: true
|
||||
talker_graph_max_cache_len: 4096
|
||||
input_connectors:
|
||||
from_stage_0: connector_of_shared_memory
|
||||
output_connectors:
|
||||
@@ -75,6 +90,12 @@ stages:
|
||||
max_num_batched_tokens: 65536
|
||||
max_model_len: 65536
|
||||
devices: "0"
|
||||
hf_overrides:
|
||||
# Decode only each chunk's NEW frames with a per-request causal-conv
|
||||
# cache (NVIDIA's S2S_USE_CODEC_CACHE path) instead of re-decoding the
|
||||
# cumulative prefix per chunk (O(T^2) in the reply length).
|
||||
# PARITY: delete this block for the prefix re-decode reference.
|
||||
use_incremental_codec_cache: true
|
||||
input_connectors:
|
||||
from_stage_1: connector_of_shared_memory
|
||||
default_sampling_params:
|
||||
|
||||
Reference in new issue
Block a user