Repository navigation
[Model] Add Ming-omni-tts MoE 16.8B-A3B + CFM CUDAGraph - #4341
Conversation
Adapt the bailing_moe (16.8B-A3B) variant on top of the dense Ming-omni-tts pipeline: - MingMoeConfig / BailingMoeConfig + variant detection; register bailingmm / bailing_moe configs; strip 3D mrope rope_scaling for the no-vision TTS path - select BailingMoeModel backbone via vllm_config.with_hf_config; positional backbone forward call (positions vs position_ids) - MoE prompt builder (<role> chat, <spk> speaker placeholder) + tokenizer- based variant dispatch; variant-aware token ids / validation / speaker slot - deploy/ming_tts_moe.yaml - CFM CUDAGraph for the flow-matching head (fm/cfm_cudagraph.py + graph-safe forward_with_cfg); ~2.1x TTFP/RTF, lazy build with eager fallback via MING_CFM_CUDAGRAPH Signed-off-by: LHXuuu <xulianhao.xlh@antgroup.com>
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
hsliuustc0106
left a comment
There was a problem hiding this comment.
Graph-focused review comments posted inline.
| def execute(self, llm_cond, his_lat, cfg_strength, sigma, temperature): | ||
| bsz = llm_cond.shape[0] | ||
| device, dtype = llm_cond.device, llm_cond.dtype | ||
| y0 = torch.randn((bsz, self.patch_size, self.latent_dim), device=device, dtype=dtype) |
There was a problem hiding this comment.
The graph path changes the numeric behavior of CFM sampling here. Eager FlowLoss.sample() creates the initial noise in fp32 and builds fp32 timesteps, then casts only the DiT inputs/final result; this uses llm_cond.dtype, which is bf16 under the new deploy. Because the graph is enabled by default, this can change the latent trajectory/audio quality for both MoE and existing dense Ming TTS. Can we keep the solver state/timesteps/noise/sde args in fp32 and only cast x/t for the model call to match eager?
There was a problem hiding this comment.
Fixed in dbb70be. The CUDAGraph path now matches the eager FlowLoss.sample dtype boundary: the whole ODE solve (y0, timesteps, SDE noise, Euler step) runs in fp32, only the DiT forward is cast to the model dtype (bf16), and the final latent is cast back at the end.
|
The overall MoE adaptation looks directionally right to me: the prompt format / special tokens are aligned with the upstream behavior, treating the TTS-only path as regular 1D RoPE is a reasonable choice, and the CFM CUDAGraph work is a useful optimization direction. However, I found two startup-path blockers in real inference. The common root cause is that this patch adapts the model forward path, but it does not fully account for what the vLLM engine consumes during initialization: both the normalized config and the tokenizer can be touched before the request ever reaches the model forward. 1. Stripping 3D mRoPE leaves
|
yuanheng-zhao
left a comment
There was a problem hiding this comment.
For now, there exist extra steps to serve the model inclusionAI/Ming-omni-tts-16.8B-A3B - we have to:
- download the model repo to local
- modify
tokenizer_config.json- remove the
auto_map - replace tokenizer class as
"tokenizer_class": "PreTrainedTokenizerFast"
- remove the
We shall find out more elegant workarounds, as these manual resolutions make it inconvenient to serve the model.
Some generated audio outputs for references:
ming_tts_moe_basic.wav
ming_tts_moe_podcast_style.wav
ming_tts_moe_zero_shot.wav
@yuanheng-zhao @Sy0307 I've already reported this to the model team, and they've fixed the HF weights/tokenizer upstream. |
Now it works with model ID. vllm-omni serve inclusionAI/Ming-omni-tts-16.8B-A3B \
--deploy-config vllm_omni/deploy/ming_tts_moe.yaml \
--omni |
Signed-off-by: Yuanheng Zhao <jonathan.zhaoyh@gmail.com>
|
Tests on 354c23f, now default deploy config yaml works: inclusionAI/Ming-omni-tts-16.8B-A3Bvllm-omni serve inclusionAI/Ming-omni-tts-16.8B-A3B \
--omni \
--port 8091And using the example requests in recipe recipes/inclusionAI/Ming-omni-tts.md, got ming_tts_basic-moe16.8B.wav inclusionAI/Ming-omni-tts-0.5Bvllm-omni serve inclusionAI/Ming-omni-tts-0.5B --omni --port 8091ming_tts_basic-dense0.5B.wav |
| def execute(self, llm_cond, his_lat, cfg_strength, sigma, temperature): | ||
| bsz = llm_cond.shape[0] | ||
| device, dtype = llm_cond.device, llm_cond.dtype | ||
| y0 = torch.randn((bsz, self.patch_size, self.latent_dim), device=device, dtype=dtype) |
|
any progress? |
… mrope Signed-off-by: LHXuuu <xulianhao.xlh@antgroup.com>
@Sy0307 Good catch, thanks — fixed. |
Signed-off-by: LHXuuu <xulianhao.xlh@antgroup.com>
# Conflicts: # vllm_omni/model_executor/models/ming_tts/ming_tts_llm.py
…ow head Signed-off-by: LHXuuu <xulianhao.xlh@antgroup.com>
Signed-off-by: LHXuuu <xulianhao.xlh@antgroup.com>
|
@yuanheng-zhao @Sy0307 PTAL again |
Signed-off-by: Yuanheng Zhao <jonathan.zhaoyh@gmail.com>
Signed-off-by: LHXuuu <xulianhao.xlh@antgroup.com>
| atc = cfg.audio_tokenizer_config | ||
| semantic_module_kwargs = _nested_get(atc, "semantic_module_kwargs", default=None) | ||
| if semantic_module_kwargs is not None: | ||
| raise ValueError("Ming dense 0.5B expects audio_tokenizer_config.semantic_module_kwargs to be null.") |
There was a problem hiding this comment.
Better distinguish model type or remove "dense 0.5B", as we support the MoE-16.8B now
| ) | ||
|
|
||
| # Fast path: CUDAGraph-captured flow head (CFM sampling + Aggregator + | ||
| # stop head). Falls back permanently to the eager path on any failure. |
There was a problem hiding this comment.
Let's consider if we want to make it fallback permanently to eager path on any failure, or re-try in future
…lver.integrate Signed-off-by: LHXuuu <xulianhao.xlh@antgroup.com>
… 1e-5) Signed-off-by: LHXuuu <xulianhao.xlh@antgroup.com>
Signed-off-by: LHXuuu <xulianhao.xlh@antgroup.com>
Head branch was pushed to by a user without write access
|
The CI errors encountered seem to be unrelated to this PR. PTAL @Gaohan123 , @yenuo26 , @tjtanaa |
Signed-off-by: Hongsheng Liu <liuhongsheng4@huawei.com>
…voice-clone collapse Signed-off-by: LHXuuu <xulianhao.xlh@antgroup.com>
… merge Signed-off-by: LHXuuu <xulianhao.xlh@antgroup.com>
… ODE integration, seeded FM noise, light package init Review fixes from PR vllm-project#4765 (linyueqian): * High-1: prefill branch now pushes a (req_id, None) placeholder onto _results_queue so compute_logits' positional pairing holds for mixed prefill+decode batches (voxcpm2 pattern). Verified: unit tests on the pairing contract + 3-request e2e, all pass. * High-2: Euler ODE integration state (z, times, CFG blend) now fp32; DiT matmuls stay bf16 under autocast, result cast back to sequence dtype (same fix as Ming CFM, PR vllm-project#4341). * Medium-1: FM noise drawn from a per-request per-step blake2b-seeded Generator instead of the global CUDA RNG (voxcpm2 parity). Verified: in-session replay is bit-identical. * Medium-3: drop eager talker import from package __init__ (registry imports submodules directly; voxcpm2 convention). Signed-off-by: Moore-Z <zhumoore9661996@gmail.com>
… ODE integration, seeded FM noise, light package init Review fixes from PR vllm-project#4765 (linyueqian): * High-1: prefill branch now pushes a (req_id, None) placeholder onto _results_queue so compute_logits' positional pairing holds for mixed prefill+decode batches (voxcpm2 pattern). Verified: unit tests on the pairing contract + 3-request e2e, all pass. * High-2: Euler ODE integration state (z, times, CFG blend) now fp32; DiT matmuls stay bf16 under autocast, result cast back to sequence dtype (same fix as Ming CFM, PR vllm-project#4341). * Medium-1: FM noise drawn from a per-request per-step blake2b-seeded Generator instead of the global CUDA RNG (voxcpm2 parity). Verified: in-session replay is bit-identical. * Medium-3: drop eager talker import from package __init__ (registry imports submodules directly; voxcpm2 convention). Signed-off-by: Moore-Z <zhumoore9661996@gmail.com>
… ODE integration, seeded FM noise, light package init Review fixes from PR vllm-project#4765 (linyueqian): * High-1: prefill branch now pushes a (req_id, None) placeholder onto _results_queue so compute_logits' positional pairing holds for mixed prefill+decode batches (voxcpm2 pattern). Verified: unit tests on the pairing contract + 3-request e2e, all pass. * High-2: Euler ODE integration state (z, times, CFG blend) now fp32; DiT matmuls stay bf16 under autocast, result cast back to sequence dtype (same fix as Ming CFM, PR vllm-project#4341). * Medium-1: FM noise drawn from a per-request per-step blake2b-seeded Generator instead of the global CUDA RNG (voxcpm2 parity). Verified: in-session replay is bit-identical. * Medium-3: drop eager talker import from package __init__ (registry imports submodules directly; voxcpm2 convention). Signed-off-by: Moore-Z <zhumoore9661996@gmail.com>
…#4341) Signed-off-by: LHXuuu <xulianhao.xlh@antgroup.com> Signed-off-by: Yuanheng Zhao <jonathan.zhaoyh@gmail.com> Signed-off-by: Hongsheng Liu <liuhongsheng4@huawei.com> Co-authored-by: Yuanheng Zhao <jonathan.zhaoyh@gmail.com> Co-authored-by: Yuanheng Zhao <54058983+yuanheng-zhao@users.noreply.github.com> Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
Purpose
This PR adds support for Ming-omni-tts-16.8B-A3B (the MoE variant) to vLLM-Omni, building on the dense 0.5B pipeline merged in #2906.
Model adaptation
bailing_moebackbone selection viavllm_config.with_hf_config(...), with newMingMoeConfig/BailingMoeConfigand config registration formodel_type="bailingmm"/"bailing_moe". The 3D mroperope_scalingis stripped — TTS carries no vision tokens, so it degenerates to standard 1D RoPE.<role>chat format,<spk>speaker placeholder) with tokenizer-based variant dispatch; variant-aware token IDs / validation / speaker slots.deploy/ming_tts_moe.yaml— single-GPU deploy (both stages colocate on one 80GB+ card).Performance optimization
MING_CFM_CUDAGRAPH=0to disable).Resolves: #1461
Test Plan
Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model. Please runmkdocs serveto sync the documentation editions to./docs.BEFORE SUBMITTING, please read https://github.com/vllm-project/vllm-omni/blob/main/CONTRIBUTING.md
(anything written below this line will be removed by GitHub Actions)