[Perf] Optimize Higgs Audio v3 serving (#4204)
Signed-off-by: Sy03 <1370724210@qq.com> Signed-off-by: Yueqian Lin <linyueqian@outlook.com> Co-authored-by: Yueqian Lin <linyueqian@outlook.com> Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
This commit is contained in:
21 files changed
+1976
-734
No files matched your search
@@ -0,0 +1,53 @@
|
||||
# Higgs-Audio V3 Deploy Profiles
|
||||
|
||||
Higgs-Audio V3 has two Stage 0 graph profiles. They are intentionally separate
|
||||
because the graph paths are mutually exclusive.
|
||||
|
||||
## High Throughput
|
||||
|
||||
Use `higgs_multimodal_qwen3_high_throughput.yaml` for medium/high concurrency
|
||||
serving. This profile keeps Stage 0 `enforce_eager: true`, which preserves the
|
||||
Higgs-specific local MLP CUDA graph path. It is the default production profile
|
||||
for throughput-oriented serving.
|
||||
|
||||
`higgs_multimodal_qwen3.yaml` is kept as the auto-discovered default deploy
|
||||
config for `model_type=higgs_multimodal_qwen3`, and matches the high-throughput
|
||||
profile.
|
||||
|
||||
```bash
|
||||
vllm-omni serve bosonai/higgs-audio-v3-tts-4b \
|
||||
--omni --trust-remote-code \
|
||||
--deploy-config vllm_omni/deploy/higgs_multimodal_qwen3_high_throughput.yaml
|
||||
```
|
||||
|
||||
## Low Latency
|
||||
|
||||
Use `higgs_multimodal_qwen3_low_latency.yaml` for low-concurrency serving
|
||||
(for example c1-c4) where Stage 0 decode launch overhead dominates. This profile
|
||||
sets Stage 0 `enforce_eager: false` and explicitly enables vLLM
|
||||
`FULL_DECODE_ONLY` CUDA graph:
|
||||
|
||||
```yaml
|
||||
compilation_config:
|
||||
cudagraph_capture_sizes: [1, 2, 4, 8, 16]
|
||||
cudagraph_mode: FULL_DECODE_ONLY
|
||||
cudagraph_num_of_warmups: 1
|
||||
```
|
||||
|
||||
FULL_DECODE is controlled by deploy configuration, not by an environment
|
||||
variable. When this external decode graph is active, the Higgs talker disables
|
||||
the local MLP CUDA graph automatically.
|
||||
|
||||
```bash
|
||||
vllm-omni serve bosonai/higgs-audio-v3-tts-4b \
|
||||
--omni --trust-remote-code \
|
||||
--deploy-config vllm_omni/deploy/higgs_multimodal_qwen3_low_latency.yaml
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
- Stage 1 remains `enforce_eager: true` in both profiles.
|
||||
- Keep `VLLM_USE_DEEP_GEMM=0` and `VLLM_MOE_USE_DEEP_GEMM=0` for this model
|
||||
unless DeepGEMM support is revalidated.
|
||||
- Revalidate end-to-end throughput and audio quality before changing the default
|
||||
auto-discovered config.
|
||||
@@ -1,5 +1,11 @@
|
||||
# Higgs-audio v3 deploy: Stage 0 (talker) -> Stage 1 (code2wav) via shared memory.
|
||||
#
|
||||
# Auto-discovered default for model_type=higgs_multimodal_qwen3. This file is
|
||||
# the high-throughput profile and intentionally keeps Stage 0 enforce_eager=true
|
||||
# so the Higgs-specific local MLP CUDA graph path remains active. For low
|
||||
# concurrency latency-sensitive serving, use
|
||||
# higgs_multimodal_qwen3_low_latency.yaml explicitly.
|
||||
#
|
||||
# Plain TTS only (no voice cloning). async_chunk streams codec chunks from
|
||||
# Stage 0 to Stage 1 as they are produced (TTFA approaches one AR loop's
|
||||
# worth of work). Stage 1 honors meta.left_context_size + meta.right_holdback_size
|
||||
@@ -32,6 +38,7 @@ stages:
|
||||
max_num_seqs: 16
|
||||
gpu_memory_utilization: 0.6
|
||||
enforce_eager: true
|
||||
attention_backend: FLASHINFER
|
||||
trust_remote_code: true
|
||||
# Stage-0 prefix caching is on by default. The talker's HS opt-out and
|
||||
# deferred ``codes.audio`` mm-output write (see higgs_audio_v3_talker.py)
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
# Higgs-audio v3 deploy, high-throughput profile.
|
||||
#
|
||||
# This is the default production profile for medium/high concurrency serving.
|
||||
# Stage 0 keeps enforce_eager=true so Higgs' local MLP CUDA graph remains active.
|
||||
# Do not enable vLLM FULL_DECODE graph here: it replaces the local MLP graph
|
||||
# path instead of stacking on top of it.
|
||||
#
|
||||
# Plain TTS only (no voice cloning). async_chunk streams codec chunks from
|
||||
# Stage 0 to Stage 1 as they are produced (TTFA approaches one AR loop's
|
||||
# worth of work). Stage 1 honors meta.left_context_size + meta.right_holdback_size
|
||||
# so the per-chunk codec windows stitch into a coherent PCM stream.
|
||||
async_chunk: true
|
||||
|
||||
connectors:
|
||||
connector_of_shared_memory:
|
||||
name: SharedMemoryConnector
|
||||
extra:
|
||||
shm_threshold_bytes: 65536
|
||||
# Stream PCM bytes back to the client as Stage 1 emits each chunk.
|
||||
codec_streaming: true
|
||||
# Streaming chunk shape for talker2code2wav_async_chunk:
|
||||
# codec_chunk_frames steady-state new frames per emit
|
||||
# codec_left_context_frames sliding past context to avoid leading-edge artifacts
|
||||
# codec_right_holdback_frames trailing frames held back so the codec
|
||||
# has future context for emit-region tail samples
|
||||
# initial_codec_chunk_frames smaller first chunk to minimize TTFA
|
||||
codec_chunk_frames: 25
|
||||
codec_left_context_frames: 25
|
||||
codec_right_holdback_frames: 4
|
||||
initial_codec_chunk_frames: 1
|
||||
connector_get_sleep_s: 0.01
|
||||
connector_get_max_wait_first_chunk: 5000
|
||||
connector_get_max_wait: 500
|
||||
|
||||
stages:
|
||||
- stage_id: 0
|
||||
max_num_seqs: 64
|
||||
gpu_memory_utilization: 0.6
|
||||
enforce_eager: true
|
||||
attention_backend: FLASHINFER
|
||||
trust_remote_code: true
|
||||
# Stage-0 prefix caching is on by default. The talker's HS opt-out and
|
||||
# deferred ``codes.audio`` mm-output write (see higgs_audio_v3_talker.py)
|
||||
# keep per-step bookkeeping negligible; any shared text prefix across
|
||||
# concurrent requests is a net throughput win. Stage 1 (codec decoder)
|
||||
# has no KV cache and stays disabled.
|
||||
enable_prefix_caching: true
|
||||
async_scheduling: false
|
||||
max_num_batched_tokens: 4096
|
||||
max_model_len: 8192
|
||||
devices: "0"
|
||||
output_connectors:
|
||||
to_stage_1: connector_of_shared_memory
|
||||
default_sampling_params:
|
||||
temperature: 1.0
|
||||
top_p: 0.95
|
||||
top_k: 50
|
||||
max_tokens: 2048
|
||||
seed: 42
|
||||
repetition_penalty: 1.0
|
||||
|
||||
- stage_id: 1
|
||||
max_num_seqs: 16
|
||||
gpu_memory_utilization: 0.25
|
||||
enforce_eager: true
|
||||
trust_remote_code: true
|
||||
enable_prefix_caching: false
|
||||
async_scheduling: false
|
||||
max_num_batched_tokens: 65536
|
||||
max_model_len: 65536
|
||||
devices: "0"
|
||||
input_connectors:
|
||||
from_stage_0: connector_of_shared_memory
|
||||
default_sampling_params:
|
||||
temperature: 0.0
|
||||
top_p: 1.0
|
||||
top_k: -1
|
||||
max_tokens: 65536
|
||||
seed: 42
|
||||
repetition_penalty: 1.0
|
||||
@@ -0,0 +1,85 @@
|
||||
# Higgs-audio v3 deploy, low-latency profile.
|
||||
#
|
||||
# Use this profile for low-concurrency serving (for example c1-c4) where Stage 0
|
||||
# decode launch overhead dominates. Stage 0 enables vLLM FULL_DECODE_ONLY CUDA
|
||||
# graph through YAML configuration:
|
||||
#
|
||||
# enforce_eager: false
|
||||
# compilation_config.cudagraph_mode: FULL_DECODE_ONLY
|
||||
#
|
||||
# This is not controlled by an environment variable. The Higgs talker disables
|
||||
# its local MLP CUDA graph automatically when the external decode graph is active,
|
||||
# because the two graph paths are mutually exclusive.
|
||||
#
|
||||
# Plain TTS only (no voice cloning). async_chunk streams codec chunks from
|
||||
# Stage 0 to Stage 1 as they are produced (TTFA approaches one AR loop's
|
||||
# worth of work). Stage 1 honors meta.left_context_size + meta.right_holdback_size
|
||||
# so the per-chunk codec windows stitch into a coherent PCM stream.
|
||||
async_chunk: true
|
||||
|
||||
connectors:
|
||||
connector_of_shared_memory:
|
||||
name: SharedMemoryConnector
|
||||
extra:
|
||||
shm_threshold_bytes: 65536
|
||||
# Stream PCM bytes back to the client as Stage 1 emits each chunk.
|
||||
codec_streaming: true
|
||||
# Streaming chunk shape for talker2code2wav_async_chunk:
|
||||
# codec_chunk_frames steady-state new frames per emit
|
||||
# codec_left_context_frames sliding past context to avoid leading-edge artifacts
|
||||
# codec_right_holdback_frames trailing frames held back so the codec
|
||||
# has future context for emit-region tail samples
|
||||
# initial_codec_chunk_frames smaller first chunk to minimize TTFA
|
||||
codec_chunk_frames: 25
|
||||
codec_left_context_frames: 25
|
||||
codec_right_holdback_frames: 4
|
||||
initial_codec_chunk_frames: 1
|
||||
connector_get_sleep_s: 0.01
|
||||
connector_get_max_wait_first_chunk: 5000
|
||||
connector_get_max_wait: 500
|
||||
|
||||
stages:
|
||||
- stage_id: 0
|
||||
max_num_seqs: 16
|
||||
gpu_memory_utilization: 0.6
|
||||
enforce_eager: false
|
||||
attention_backend: FLASHINFER
|
||||
trust_remote_code: true
|
||||
enable_prefix_caching: true
|
||||
async_scheduling: false
|
||||
compilation_config:
|
||||
cudagraph_capture_sizes: [1, 2, 4, 8, 16]
|
||||
cudagraph_mode: FULL_DECODE_ONLY
|
||||
cudagraph_num_of_warmups: 1
|
||||
max_num_batched_tokens: 4096
|
||||
max_model_len: 8192
|
||||
devices: "0"
|
||||
output_connectors:
|
||||
to_stage_1: connector_of_shared_memory
|
||||
default_sampling_params:
|
||||
temperature: 1.0
|
||||
top_p: 0.95
|
||||
top_k: 50
|
||||
max_tokens: 2048
|
||||
seed: 42
|
||||
repetition_penalty: 1.0
|
||||
|
||||
- stage_id: 1
|
||||
max_num_seqs: 16
|
||||
gpu_memory_utilization: 0.25
|
||||
enforce_eager: true
|
||||
trust_remote_code: true
|
||||
enable_prefix_caching: false
|
||||
async_scheduling: false
|
||||
max_num_batched_tokens: 65536
|
||||
max_model_len: 65536
|
||||
devices: "0"
|
||||
input_connectors:
|
||||
from_stage_0: connector_of_shared_memory
|
||||
default_sampling_params:
|
||||
temperature: 0.0
|
||||
top_p: 1.0
|
||||
top_k: -1
|
||||
max_tokens: 65536
|
||||
seed: 42
|
||||
repetition_penalty: 1.0
|
||||
Reference in new issue
Block a user