Files
vllm-omni/README.md
T
2025-10-30 17:18:19 +08:00

3.3 KiB

vLLM-omni: Multi-modal Extension for vLLM

vLLM-omni is designed to extend vLLM capabilities to support multi-modality model inference and serving, particularly focusing on non-autoregressive structures and non-textual outputs.

🎯 Overview

Traditional vLLM systems are limited to text-based, autoregressive generation. vLLM-omni addresses this limitation by enabling support for:

  • Multi-modal Models: Text, image, video, audio, and sensor data processing
  • Non-autoregressive Architectures: Diffusion Transformers (DiT) and other parallel generation models
  • Heterogeneous Outputs: Beyond traditional text generation to multimodal outputs

🏗️ Architecture

vLLM-omni is built on a modular architecture that extends vLLM's core functionality:

🚀 Key Features

Multi-Engine Support

  • Autoregressive Engine: Traditional text generation with enhanced KV-caching
  • Diffusion Engine: Support for DiT models and iterative generation
  • Hybrid Engine: Combined AR+DiT processing pipelines

Modality Processing

  • Text: Advanced tokenization and embedding generation
  • Image: Vision encoder integration (CLIP, etc.)
  • Audio: Speech processing and audio embedding

📋 Supported Models

AR + Diffusion Transformer (DiT) Models

  • Qwen-omni (Thinker-Talker-Codec structure)
  • HunyunaImage 3.0 (Ongoing)
  • Qwen-Image (Ongoing)

🛠️ Installation

Installation of vLLM

Use Docker to keep consistent basic environment (Optional, Recommended)

docker run --gpus all --ipc=host --network=host -v $source_dir:$container_dir --rm --name $container_name -it nvcr.io/nvidia/pytorch:25.01-py3 bash

Set up basic uv environment

pip install uv
uv venv --python 3.12 --seed
source .venv/bin/activate

Install certain version of vllm with commitid: 808a7b69df479b6b3a16181711cac7ca28a9b941

git clone https://github.com/vllm-project/vllm.git
cd vllm
git checkout 808a7b69df479b6b3a16181711cac7ca28a9b941

Set up environment variables to get pre-built wheels. If there are internet problems, just download the whl file manually. And set VLLM_PRECOMPILED_WHEEL_LOCATION as your local absolute path of whl file.

export VLLM_COMMIT=808a7b69df479b6b3a16181711cac7ca28a9b941
export VLLM_PRECOMPILED_WHEEL_LOCATION=https://wheels.vllm.ai/${VLLM_COMMIT}/vllm-1.0.0.dev-cp38-abi3-manylinux1_x86_64.whl

Install vllm with command below.

uv pip install --editable .

Installation of vLLM-omni

Install additional requirements for vllm-omni

git clone https://github.com/vllm-project/vllm-omni.git
cd vllm_omni
uv pip install -r requirements.txt

Run examples (Qwen2.5-omni)

Get into the example folder

cd examples/offline_inference/qwen_2_5_omni

Modify PYTHONPATH in run.sh as your path of vllm_omni. Then run.

bash run.sh

The output audio is saved in ./output_audio

To-do list

  • Offline inference example for Qwen2.5-omni with single request
  • Adaptation from current vllm branch to stable vllm v0.11.0
  • Offline inference example for Qwen2.5-omni with streaming multiple requests
  • Online inference support
  • Support for other models

For detailed model management, see vllm_omni_design.md and high_level_arch_design.md.