[Hardware][Ascend] Enable VoxCPM2 eager optimizations (#7207)
Signed-off-by: Big2Wheel <1404207590@qq.com>
This commit is contained in:
1 parent
b2b6c6c7a9
commit
b6b868f3de
7 files changed
+234
-36
No files matched your search
@@ -43,9 +43,65 @@ sufficient — no tensor parallelism is required.
|
||||
|
||||
## Hardware Support
|
||||
|
||||
This recipe documents one tested 24 GB consumer-GPU configuration.
|
||||
Larger-VRAM (H20 / H100 / A100) and other vendor sections (ROCm, NPU) are
|
||||
welcome as community validation lands.
|
||||
This recipe documents tested single-card configurations for a 24 GB NVIDIA
|
||||
GPU and an Ascend Atlas A2.
|
||||
|
||||
## Ascend NPU
|
||||
|
||||
### 1 x Ascend 910B3 64GB (Atlas A2)
|
||||
|
||||
VoxCPM2 runs on one Atlas A2 card with the standard deploy config. The model's
|
||||
LocDiT path uses eager PyTorch on NPU; keep `enforce_eager: true`. The default
|
||||
config enables fused QKV, fused gate/up projection, and the zero-delta-time
|
||||
cache for this path.
|
||||
|
||||
#### Environment
|
||||
|
||||
- Hardware: 1 x Ascend 910B3 64GB (Atlas A2)
|
||||
- Container: `quay.nju.edu.cn/ascend/vllm-omni:v0.28.0`
|
||||
- vLLM: 0.28.0
|
||||
- vLLM-Omni: current `main`
|
||||
- Model: `openbmb/VoxCPM2`, bfloat16
|
||||
|
||||
#### Command
|
||||
|
||||
Expose one physical NPU to the container, then start the server normally. The
|
||||
visible card is addressed as logical device `0` by `voxcpm2.yaml`.
|
||||
|
||||
```bash
|
||||
export ASCEND_RT_VISIBLE_DEVICES=5
|
||||
export VLLM_WORKER_MULTIPROC_METHOD=spawn
|
||||
|
||||
vllm serve /path/to/VoxCPM2 --omni \
|
||||
--host 0.0.0.0 --port 8000
|
||||
```
|
||||
|
||||
#### Performance validation
|
||||
|
||||
The component timer was measured after model warmup with a single Chinese TTS
|
||||
request. Each decode step executes nine LocDiT estimator calls, so per-step
|
||||
measurements compare the same amount of model work even when generated audio
|
||||
duration differs.
|
||||
|
||||
| path | CFM estimator / call | decode / step | forward / step |
|
||||
| ---- | -------------------- | ------------- | -------------- |
|
||||
| Before (optimization flags skipped on NPU) | 18.84 ms | 193.86 ms | 265.35 ms |
|
||||
| Fused QKV + fused MLP + zero-dt cache | 17.50 ms | 182.22 ms | 254.07 ms |
|
||||
| Above + experimental reduced-precision RoPE | 14.93 ms | 157.36 ms | 227.33 ms |
|
||||
|
||||
The default fused path reduces CFM estimator latency by about **7.1%** and
|
||||
complete decode-step latency by **6.0%**. Its generated WAV was byte-identical
|
||||
to the pre-optimization baseline. Setting
|
||||
`enable_loc_dit_fast_rope: true` can increase the reductions to about **20.8%**
|
||||
and **18.8%**, respectively, but changes the recurrent acoustic state and is
|
||||
therefore an opt-in quality/performance tradeoff. Its test audio was valid 48
|
||||
kHz mono PCM with finite samples and no clipping; evaluate voice quality on a
|
||||
representative corpus before enabling it in production.
|
||||
|
||||
Do not set `enforce_eager: false` for VoxCPM2 on Ascend yet. ACL Graph captures
|
||||
the language-model runner, but the request-owned VoxCPM2 state has dynamic
|
||||
prefill/decode shapes; replay can therefore feed an empty captured row into a
|
||||
non-empty residual state and fail at `aclnnCat`.
|
||||
|
||||
## GPU
|
||||
|
||||
@@ -88,8 +144,8 @@ Pass `--deploy-config <path>` to override.
|
||||
#### Verification
|
||||
|
||||
**Server cold-start**: ~60 s from `vllm serve` to `Application startup
|
||||
complete` (subprocess fork + vLLM 0.21 init + model load + flashinfer JIT
|
||||
+ torch.compile of LocDiT / feat_encoder / AudioVAE + CUDA-Graph warmup).
|
||||
complete` (subprocess fork, vLLM 0.21 init, model load, flashinfer JIT,
|
||||
torch.compile of LocDiT / feat_encoder / AudioVAE, and CUDA-Graph warmup).
|
||||
The first request after startup pays a small additional cost; steady-state
|
||||
requests are much faster.
|
||||
|
||||
@@ -199,7 +255,7 @@ after a one-off ~28 s engine init:
|
||||
| ---- | -------- | --------- | ----- | ------------------------------------------------ |
|
||||
| #1 | 6.72 s | 11.97 s | 1.782 | cold: torch.compile + CUDA-Graph capture |
|
||||
| #2 | 6.24 s | 11.43 s | 1.831 | still runtime warmup |
|
||||
| #3 | 6.88 s | 0.82 s | 0.120 | ⚡ steady-state |
|
||||
| #3 | 6.88 s | 0.82 s | 0.120 | steady-state |
|
||||
| #4 | 6.56 s | 0.78 s | 0.119 | steady-state |
|
||||
| #5 | 5.76 s | 0.70 s | 0.121 | steady-state |
|
||||
|
||||
@@ -231,7 +287,7 @@ Same 5-call methodology as the zero-shot table, this time with a
|
||||
| ---- | -------- | --------- | ----- | ------------------------------------------------ |
|
||||
| #1 | 5.44 s | 12.38 s | 2.276 | cold: compile + CUDA-Graph capture + ref encode |
|
||||
| #2 | 5.12 s | 2.47 s | 0.482 | most warmup done |
|
||||
| #3 | 5.44 s | 0.76 s | 0.139 | ⚡ steady-state |
|
||||
| #3 | 5.44 s | 0.76 s | 0.139 | steady-state |
|
||||
| #4 | 4.96 s | 0.68 s | 0.137 | steady-state |
|
||||
| #5 | 5.28 s | 0.71 s | 0.134 | steady-state |
|
||||
|
||||
|
||||
+1
-1
@@ -76,7 +76,7 @@ recipes/
|
||||
| [`cosmos3/Cosmos3-Edge.md`](./cosmos3/Cosmos3-Edge.md) | T2I / T2V / I2V + action (Physical-AI) generation on the Nemotron-based Edge transformer | 1x GPU (~8 GiB) |
|
||||
| [`cosmos3/Cosmos3-Super.md`](./cosmos3/Cosmos3-Super.md) | 64B T2I / T2V / I2V / V2V generation (+ optional audio) / Action policy | 8x H200/H100/A100 / 2x H200 / B300 |
|
||||
| [`OpenBMB/MiniCPM-o-4_5.md`](./OpenBMB/MiniCPM-o-4_5.md) | Online full-duplex serving and offline inference for omni multimodal chat (text / image / audio / video → text + 24 kHz speech) | 2x A100/H100 80GB / 3x mid-tier GPU / 8x RTX 4090 24GB |
|
||||
| [`OpenBMB/VoxCPM2.md`](./OpenBMB/VoxCPM2.md) | Online + offline TTS with native AR pipeline (48 kHz, 30+ languages) | 1x RTX 4090 24GB |
|
||||
| [`OpenBMB/VoxCPM2.md`](./OpenBMB/VoxCPM2.md) | Online + offline TTS with native AR pipeline (48 kHz, 30+ languages) | 1x RTX 4090 24GB / 1x Ascend 910B3 64GB |
|
||||
| [`OpenMOSS/MOSS-TTS.md`](./OpenMOSS/MOSS-TTS.md) | Online + offline multilingual TTS (MOSS-TTS family, 8B) | 1x H100 80GB |
|
||||
| [`OpenMOSS/MOSS-TTS-Nano-NPU.md`](./OpenMOSS/MOSS-TTS-Nano-NPU.md) | Online multilingual voice-cloned TTS | 1x Ascend 910B3 64GB |
|
||||
| [`NVIDIA/Nemotron-Labs-Audex.md`](./NVIDIA/Nemotron-Labs-Audex.md) | TTS / text-to-audio / audio understanding / cascaded S2S (Audex 2B + 30B-A3B) | 1x H100 80GB |
|
||||
|
||||
Reference in new issue
Block a user