[Hardware][Ascend][Model] Optimize Qwen3-TTS on 310P - #4841
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. |
061d75d to
a60b42f
Compare
|
can you check the recent vllm blog for how to optimize tts serving? |
| @@ -5,16 +5,36 @@ | |||
|
|
|||
There was a problem hiding this comment.
the large patch seems hard to maintain in the long run
There was a problem hiding this comment.
If we want to reduce the number of patches, some modifications need to be incorporated into the mainline. Currently, the accuracy has only been verified on version 310.
There was a problem hiding this comment.
😂I'm not familiar with 310p. But the current change for 310p is hard to abstract.
|
compare before/after this commit interms off ttfp/rtf/througput |
|
Here, we have mainly optimized the writing and computation process and integrated fusion operators, which are based on the design of vllm ascend. |
a3bbb0a to
28658e7
Compare
4ea09ab to
420d63c
Compare
|
Solid performance gains on NPU A3. Bench Scriptpython benchmarks/tts/bench_tts.py \
--model Qwen/Qwen3-TTS-12Hz-1.7B-Base \
--task voice_clone \
--locale en \
--concurrency 1 4 8 \
--num-prompts 32 \
--dataset-path /root/.cache/seedtts_testset \
--host localhost --port 8091PerformaceTask:
|
Signed-off-by: zouyizhou <zouyizhou@huawei.com>
|
Retested on A3, LGTM. |
|
LGTM |
Signed-off-by: zouyizhou <zouyizhou@huawei.com>
Signed-off-by: zouyizhou <zouyizhou@huawei.com>
Head branch was pushed to by a user without write access
Handle reduced-vocabulary sampling without losing token indices, preserve the reference encoder dtype contract, and keep 310P-only execution on its supported kernels. Signed-off-by: zouyizhou <zouyizhou@huawei.com>
Signed-off-by: zouyizhou <zouyizhou@huawei.com> Co-authored-by: amy-why-3459 <wuhaiyan17@huawei.com>
Signed-off-by: zouyizhou <zouyizhou@huawei.com> Co-authored-by: amy-why-3459 <wuhaiyan17@huawei.com> Signed-off-by: y_null <y_null@qq.com>
|
Currently, 310 only supports the qwen3-tts model. Referenced versions: |
|
我想问一下,在310p上有没有针对qwen3-tts的量化方法。目前RTF1.4-1.7左右,需要量化加快推理速度 |
The code predictor's _RotaryEmbedding recomputed outer(positions, inv_freq) + cos + sin on every forward (forward_cuda/forward_native), issuing a matmul and two trig kernels per AR step plus the implied host-device syncs. The NPU path already cached these tables (vllm-project#4841); this extends the same compute-once cos_cached/sin_cached + index-per-call lookup to CUDA/XPU, so the tables are no longer recomputed on every autoregressive step. forward_native keeps the original HuggingFace on-the-fly computation as a numeric reference. The cached math is bit-identical to it (emb = cat(freqs, freqs) from the same inv_freq in float32, cast at the end), verified allclose with max diff 0.0 across fp16/bf16/fp32. Existing dtype tests still pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: I-wave <2083236231@qq.com>
The code predictor's _RotaryEmbedding recomputed outer(positions, inv_freq) + cos + sin on every forward (forward_cuda/forward_native), issuing a matmul and two trig kernels per AR step plus the implied host-device syncs. The NPU path already cached these tables (vllm-project#4841); this extends the same compute-once cos_cached/sin_cached + index-per-call lookup to CUDA/XPU, so the tables are no longer recomputed on every autoregressive step. forward_native keeps the original HuggingFace on-the-fly computation as a numeric reference. The cached math is bit-identical to it, verified allclose with max diff 0.0 across fp16/bf16/fp32. Existing dtype tests still pass. Signed-off-by: I-wave <2083236231@qq.com>
Signed-off-by: zouyizhou <zouyizhou@huawei.com> Co-authored-by: amy-why-3459 <wuhaiyan17@huawei.com>


Purpose
This PR adds Ascend 310P-specific optimizations for Qwen3-TTS.
The changes are scoped to the 310P platform patch path and avoid changing the
generic Qwen3-TTS model implementation. The patch optimizes both stage-0
Talker/CodePredictor and stage-1 Code2Wav execution on 310P.
Main changes:
AICore fault seen with different reference audio lengths.
ConvTranspose1d weights to FRACTAL_Z after weight loading.
and attention path with 310P-friendly fused/layout-aware operators.
to remove repeated per-step projection matmuls.
Test Plan
Hardware:
Environment:
Deploy config:
Compared with the default qwen3_tts.yaml, the 310P benchmark config only
changes the following fields:
Service command:
vllm-omni serve Qwen/Qwen3-TTS-12Hz-1.7B-Base
--omni
--port 8091
--task-type Base
--deploy-config qwen3_tts_310p.yaml
vLLM Version
v0.24.0
vLLM-Omni Commit
9ceca4e
Test Result
performance:

Use the seed-tts-eavl zh dataset, specifically the 10002287-00000099.wav file, to test the corresponding reference audio and output text. After preheating twice, use curl to send 20 requests and take the average.
precision:

seed-tts-eval zh dataset accuracy results: