Skip to content

Add NPU support for OmniMRotaryEmbedding - #3609

Merged
hsliuustc0106 merged 1 commit into
vllm-project:mainfrom
Wallbreazzz:feature/npu-mrope-support
Jun 18, 2026
Merged

hsliuustc0106 merged 1 commit into
vllm-project:mainfrom
Wallbreazzz:feature/npu-mrope-support

Conversation

@Wallbreazzz

Copy link
Copy Markdown
Contributor

Summary

This PR adds NPU platform support for OmniMRotaryEmbedding to enable NPU-specific optimizations for Qwen3-TTS models, resulting in significant performance improvements on Ascend NPU.

Problem

OmniMRotaryEmbedding does not support NPU platform. When running Qwen3-TTS on NPU, it imports the default MRotaryEmbedding from upstream vLLM which lacks NPU-specific optimizations, leading to suboptimal performance.

Root Cause & Fix

The mrope.py file directly imports MRotaryEmbedding from upstream vLLM without platform detection.This prevents using NPU-optimized AscendMRotaryEmbedding from vllm-ascend. Add platform detection to dynamically select the appropriate base class.This enables OmniMRotaryEmbedding to inherit from AscendMRotaryEmbedding on NPU, ensuring proper NPU support while maintaining compatibility with other platforms.

Testing

Performance benchmark on Ascend 910B NPU shows significant improvements:
Single concurrent (max-concurrency=1):

Metric Without Optimization With Optimization Improvement
Mean E2EL (ms) 4915.17 4024.87 18.1%
Mean AUDIO_TTFP (ms) 347.30 298.54 14.1%
Mean AUDIO_RTF 1.38 1.15 16.7%
Audio throughput (audio/s) 0.72 0.87 20.8%
Request throughput (req/s) 0.20 0.25 25.0%

10 concurrent (max-concurrency=10):

Metric Without Optimization With Optimization Improvement
Mean E2EL (ms) 10891.91 7910.01 27.4%
Mean AUDIO_TTFP (ms) 876.74 700.04 20.2%
Mean AUDIO_RTF 2.51 1.84 26.9%
Audio throughput (audio/s) 3.66 5.07 38.5%
Request throughput (req/s) 0.84 1.17 39.3%

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@Wallbreazzz
Wallbreazzz force-pushed the feature/npu-mrope-support branch from c39aadf to f904d6c Compare May 14, 2026 12:28
Signed-off-by: Wallbreazzz <110282866+Wallbreazzz@users.noreply.github.com>
@Wallbreazzz
Wallbreazzz force-pushed the feature/npu-mrope-support branch from f904d6c to fa8b15f Compare May 14, 2026 12:33
from vllm.logger import init_logger
from vllm.model_executor.layers.rotary_embedding.mrope import MRotaryEmbedding

from vllm_omni.platforms import current_omni_platform

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little bit confused about the plugin system, where are the entries of different hardware? @gcanlin

@Gaohan123 Gaohan123 added this to the v0.22.0 milestone May 18, 2026
@Gaohan123 Gaohan123 modified the milestones: v0.22.0, v0.24.0 Jun 10, 2026
@hsliuustc0106 hsliuustc0106 added the ready label to trigger buildkite CI label Jun 17, 2026
@hsliuustc0106
hsliuustc0106 merged commit c782746 into vllm-project:main Jun 18, 2026
6 of 8 checks passed
alex-jw-brooks pushed a commit to alex-jw-brooks/vllm-omni that referenced this pull request Jun 23, 2026
Signed-off-by: Wallbreazzz <110282866+Wallbreazzz@users.noreply.github.com>
khairulkabir1661 pushed a commit to khairulkabir1661/vllm-omni that referenced this pull request Sep 25, 2026
Signed-off-by: Wallbreazzz <110282866+Wallbreazzz@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready label to trigger buildkite CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants