Skip to content

[Model][VLM] Add Qwen2.5-Omni model support (thinker only) #15130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 39 commits into from
Apr 19, 2025

Conversation

fyabc
Copy link
Contributor

@fyabc fyabc commented Mar 19, 2025

This PR adding support for Qwen2.5-Omni model (thinker only).

Requirements

This PR requires this corresponding transformers PR.

pip install git+https://github.com/huggingface/transformers@f742a644ca32e65758c3adb36225aef1731bd2a8

Note: You need to install transformers from source from that branch

Example Usage

# Audio + image + video
python examples/offline_inference/qwen2_5_omni/only_thinker.py -q mixed_modalities

# Read vision and audio inputs from a single video file
# NOTE: V1 engine does not support interleaved modalities yet.
VLLM_USE_V1=0 python examples/offline_inference/qwen2_5_omni/only_thinker.py -q use_audio_in_video

# Process audio inputs
python examples/offline_inference/audio_language.py --model-type qwen2_5_omni

# Process image inputs
python examples/offline_inference/vision_language.py --modality image --model-type qwen2_5_omni

# Process video inputs
python examples/offline_inference/vision_language.py --modality video --model-type qwen2_5_omni

Notes

The whole Qwen2.5-Omni model includes three parts:

  • thinker: multimodal inputs -> text responses & hidden states
  • talker: text responses & hidden states from thinker -> speech codes
  • code2wav (streaming codec decoder): codes -> speech

This PR only implements the thinker part now, it accepts multimodal inputs (images / videos / audios), and generate text responses, similar to other common VLMs.
We have also develped an end-to-end implementation (will be released soon), but due to its significant impact on the vLLM framework architecture, we will not create the related pull request for now.

FIX #15563

Copy link

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

🚀

@mergify mergify bot added documentation Improvements or additions to documentation multi-modality Related to multi-modality (#4194) v1 labels Mar 19, 2025
@DarkLight1337
Copy link
Member

Sorry I don't have time to review in detail tonight, but from a quick glance, can you add this model to the following pages?

  • Supported Models page
  • tests/models/registry.py (set is_available_online=False to pass CI until the model repo is released on HF)
  • tests/models/multimodal/processing/test_common.py
  • tests/models/decoder_only/vision_language/test_models.py (optional for now)

@fyabc
Copy link
Contributor Author

fyabc commented Mar 19, 2025

Sorry I don't have time to review in detail tonight, but from a quick glance, can you add this model to the following pages?

  • Supported Models page
  • tests/models/registry.py (set is_available_online=False to pass CI until the model repo is released on HF)
  • tests/models/multimodal/processing/test_common.py
  • tests/models/decoder_only/vision_language/test_models.py (optional for now)

OK,I will add them tomorrow.

@ywang96 ywang96 self-assigned this Mar 19, 2025
@yangninghua
Copy link

@fyabc Qwen/Qwen2.5-Omni-7B ??

@ywang96
Copy link
Member

ywang96 commented Mar 21, 2025

Sorry for the delay - going to take a look at this PR tonight!

Copy link
Member

@ywang96 ywang96 left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution! I have left some comments!

@fyabc
Copy link
Contributor Author

fyabc commented Mar 24, 2025

Hi @ywang96 @DarkLight1337 , I update some other examples here, please check the code.

@DarkLight1337 DarkLight1337 added ready ONLY add when PR is ready to merge/full CI is needed and removed structured-output speculative-decoding labels Apr 18, 2025
@fyabc fyabc requested a review from ywang96 April 18, 2025 11:56
@DarkLight1337
Copy link
Member

DarkLight1337 commented Apr 18, 2025

Can you resolve the failures in the basic models test?

@fyabc
Copy link
Contributor Author

fyabc commented Apr 18, 2025

Can you resolve the failures in the basic models test?

Hi @DarkLight1337, I have fixed the test registry, now the api timeout error seems raised outside of thie PR.

Copy link
Member

@ywang96 ywang96 left a comment

Choose a reason for hiding this comment

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

Very sorry for the long delay - let's get this in!

@ywang96 ywang96 merged commit 2c1bd84 into vllm-project:main Apr 19, 2025
49 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Multi-modal Model Requests Apr 19, 2025
yangw-dev pushed a commit to yangw-dev/vllm that referenced this pull request Apr 21, 2025
…ect#15130)

Signed-off-by: fyabc <[email protected]>
Signed-off-by: Roger Wang <[email protected]>
Co-authored-by: Roger Wang <[email protected]>
Co-authored-by: Roger Wang <[email protected]>
Co-authored-by: Xiong Wang <[email protected]>
Signed-off-by: Yang Wang <[email protected]>
jikunshang pushed a commit to jikunshang/vllm that referenced this pull request Apr 29, 2025
…ect#15130)

Signed-off-by: fyabc <[email protected]>
Signed-off-by: Roger Wang <[email protected]>
Co-authored-by: Roger Wang <[email protected]>
Co-authored-by: Roger Wang <[email protected]>
Co-authored-by: Xiong Wang <[email protected]>
lk-chen pushed a commit to lk-chen/vllm that referenced this pull request Apr 29, 2025
…ect#15130)

Signed-off-by: fyabc <[email protected]>
Signed-off-by: Roger Wang <[email protected]>
Co-authored-by: Roger Wang <[email protected]>
Co-authored-by: Roger Wang <[email protected]>
Co-authored-by: Xiong Wang <[email protected]>
adobrzyn pushed a commit to HabanaAI/vllm-fork that referenced this pull request Apr 30, 2025
…ect#15130)

Signed-off-by: fyabc <[email protected]>
Signed-off-by: Roger Wang <[email protected]>
Co-authored-by: Roger Wang <[email protected]>
Co-authored-by: Roger Wang <[email protected]>
Co-authored-by: Xiong Wang <[email protected]>
Signed-off-by: Agata Dobrzyniewicz <[email protected]>
RichardoMrMu pushed a commit to RichardoMrMu/vllm that referenced this pull request May 12, 2025
…ect#15130)

Signed-off-by: fyabc <[email protected]>
Signed-off-by: Roger Wang <[email protected]>
Co-authored-by: Roger Wang <[email protected]>
Co-authored-by: Roger Wang <[email protected]>
Co-authored-by: Xiong Wang <[email protected]>
Signed-off-by: Mu Huai <[email protected]>
wenbinc-Bin added a commit to wenbinc-Bin/vllm-fork that referenced this pull request May 19, 2025
Official PR: vllm-project#15130

example:
python examples/offline_inference/audio_language.py --model-type qwen2_5_omni

python examples/offline_inference/vision_language.py --modality image --model-type qwen2_5_omni

python examples/offline_inference/vision_language.py --modality video --model-type qwen2_5_omni

Signed-off-by: Chen, Wenbin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/build documentation Improvements or additions to documentation frontend multi-modality Related to multi-modality (#4194) ready ONLY add when PR is ready to merge/full CI is needed v1
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[New Model]: please surport for Qwen/Qwen2.5-Omni-7B