Repository navigation
[Perf][MiniCPM-o] Fuse the NPU CFM DiT body - #8908
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
This PR appears to belong to: docs/design/module/ar_runtime.md, docs/design/module/model_integration.md. Module owners: @gcanlin @fake0fan @Gaohan123 Routing: @gcanlin via module of the changed files, CODEOWNERS; @fake0fan via module of the changed files; @Gaohan123 via module of the changed files @amy-why-3459, please review your own changes and leave a short self-review comment describing what you checked. PRs without author self-review may not be assigned a reviewer. Please take a look when you have a chance. If you would like an automated review, mention @vllm-omni-review-bot in a comment. |
ad53118 to
725e4fc
Compare
Omni ReviewBot: supersededThe CI failure noted on |
78c9b18 to
4284b7f
Compare
|
@amy-why-3459, for 4284b7ff:
|
4284b7f to
5850d69
Compare
|
Validated current head A full MiniCPM-o 4.5 duplex launch also cannot initialize in this server image because the model-registry subprocess aborts while the source reports a vLLM-Omni 0.1.dev / vLLM 0.31 major-minor mismatch. I cannot attribute either failure to this PR, so I have no code-level finding. |
5850d69 to
9a7b439
Compare
|
Reproduced the fused-body claim at real shapes on 8×Ascend 910B1, single card (torch_npu 2.10.0.post4, CANN 9.1.0, vllm-omni @ 9a7b439). I mirrored
Graph replay was active in both graph arms ( One discrepancy between the description and the diff: the body says " |
9a7b439 to
a587eb6
Compare
|
@hsliuustc0106 Could you please help review and merge this PR? The Seed-TTS end-to-end results in the description show mean audio RTF improving from 2.223 to 1.402 at concurrency 8 and from 4.207 to 2.510 at concurrency 16: approximately 1.59x and 1.68x in inverse-RTF speed (over 50% improvement), with zero failed requests. These correspond to RTF reductions of 36.9% and 40.3%. Please help move this forward once the remaining review requirements and CI checks are satisfied. Thanks! |
Omni ReviewBot: supersededThe CI failure noted on |
cfc19f0 to
fa28425
Compare
05cdf64 to
5cdf942
Compare
Omni ReviewBot: supersededThe CI failure noted on |
Pack QKV, AddLayerNorm, and in-place KV so Whole-Euler graph replay launches fewer kernels on Ascend. Signed-off-by: amy-why-3459 <wuhaiyan17@huawei.com>
…h step Trim batch-bucket padding from graph outputs again and take the time embedding from the backend's shared device frequency table. Signed-off-by: amy-why-3459 <wuhaiyan17@huawei.com>
Signed-off-by: amy-why-3459 <wuhaiyan17@huawei.com>
4bf7ca9 to
eac067c
Compare
…d CFM DiT modules Main's vllm-project#8908 added function-level imports of vllm_omni.platforms.npu.models.cosyvoice2_dit_attn and vllm_omni.platforms.npu.models.minicpmo_fused to minicpmo_4_5/batched_token2wav.py. List both under NPU group 1. Signed-off-by: Armaan Amatya <armaanamatya2014@gmail.com>
Contributor intent (required human answers)
1. What outcome do you want to achieve?
Lower MiniCPM-o 4.5 Code2Wav CFM time on Ascend by landing the local NPU DiT fused body.
2. What is the highest-leverage variable for that outcome?
DiT body time inside Whole-Euler graph replay. At the serving chunk shape the body is kernel-launch bound.
3. How will this work move that variable?
Run the shared fused DiT schedule on NPU with packed QKV, ACLNN AddLayerNorm, and in-place KV writes.
4. Whose customer or user needs does this address, and what are those needs?
People serving MiniCPM-o 4.5 on Ascend, who need faster speech from Code2Wav.
Purpose
Enable the CFM fused DiT body on NPU. CUDA keeps tiled TF32 attention. NPU uses the same block schedule with packed QKV, in-place KV, and
npu_add_layer_norm.cfm_fused_bodydefaults on for NPU and is set inminicpmo_4_5.yaml. Slot pool stays CUDA-only. An explicitcfm_fused_body: falsekeeps the ragged body.Uncaptured shapes stay eager. Eager fused-body forwards were slower than the ragged body in the measurement below, so this helps the graph-replay path that serving uses (
enable_cfm_graph: true).Test Plan
tests/model_executor/models/minicpmo_4_5/test_npu_dit_fused_body.pytests/model_executor/models/minicpmo_4_5/test_code2wav_batching.py::test_cfm_fused_body_defaults_on_for_nputests/platforms/npu/test_minicpmo_attention_in_place.pyvLLM Version: 0.31.0
vLLM-Omni Commit:
9637dd458vs parenta1c334877Test Result
DiT body microbenchmark on one idle Ascend 910B1. Real structure: 16 layers, hidden 512, 8 heads. Chunk is 50 mel frames (25 codec tokens). Row count is twice the request count because of classifier-free guidance. Eager is 20 timed calls and graph replay is 30, both device-synchronized. The baseline is parent
a1c334877. The fused path is this commit. Each audio chunk runs 10 Euler steps, so multiply the table by 10 for one chunk of CFM body time.Eager fused forwards were slower (about 37.5 ms to 44.9 ms at 1 request). The body-only table above is not the serving result. Seed-TTS end-to-end RTF is in the next section.
On a smaller non-zero estimator, AddLayerNorm max abs error was
9.5e-7and the full body max abs error was4.8e-7. The CPU schedule-alignment tests passed. The real CosyVoice final projection is zero-initialized, so the returned mel of that microbenchmark is zeros and was not used as a numeric check.Seed-TTS end-to-end
Same chat-completions path on one Ascend 910B3 (NPU 0), vLLM 0.31.0, MiniCPM-o 4.5, seed-tts-eval
en, warmup 1. Concurrency 1 / 8 / 16 with 4 / 32 / 64 prompts. Failed requests: 0. Lower audio RTF is better.The unchanged baseline is parent
9bbfb61d50(server logfused_body=False). Refactor isa5cf9e609withcfm_fused_body: trueinminicpmo_4_5.yaml(server logfused_body=True).Median RTF moves from 0.521 / 2.216 / 4.167 to 0.470 / 1.406 / 2.474.
Made with Cursor