Files

107 lines
3.5 KiB
Markdown
Raw Permalink Normal View History

2025-09-11 14:32:51 +08:00
# 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.
2025-09-16 16:17:10 +08:00
## 🎯 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
2025-10-23 15:18:13 +08:00
- **Heterogeneous Outputs**: Beyond traditional text generation to multimodal outputs
2025-09-16 16:17:10 +08:00
## 🏗️ 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)
2025-10-23 15:18:13 +08:00
- HunyunaImage 3.0 (Ongoing)
- Qwen-Image (Ongoing)
2025-09-16 16:17:10 +08:00
## 🛠️ Installation
2025-11-04 22:06:41 +08:00
### Environment setup
2025-10-30 17:16:25 +08:00
2025-10-30 14:37:07 +08:00
Use Docker to keep consistent basic environment (Optional, Recommended)
```bash
2025-11-05 10:46:05 +08:00
docker run --gpus all --ipc=host --network=host -v $source_dir:$container_dir --name $container_name -it nvcr.io/nvidia/pytorch:25.01-py3 bash
2025-10-30 14:37:07 +08:00
```
Set up basic uv environment
2025-10-23 15:18:13 +08:00
```bash
2025-10-30 17:18:19 +08:00
pip install uv
2025-10-23 15:18:13 +08:00
uv venv --python 3.12 --seed
source .venv/bin/activate
```
2025-11-04 22:06:41 +08:00
### Installation of vLLM (for users)
Now we build it based on vLLM v0.11.0. Please install it with command below.
```bash
uv pip install vllm==0.11.0 --torch-backend=auto
```
### Installation of vLLM (for developers)
2025-11-05 10:46:05 +08:00
If you want to check or debug with source code of vLLM, install stable release version of vllm with 0.11.0 from source with pre-built wheel file.
2025-09-16 16:17:10 +08:00
2025-10-30 14:37:07 +08:00
```bash
git clone https://github.com/vllm-project/vllm.git
cd vllm
2025-11-04 22:06:41 +08:00
git checkout v0.11.0
2025-10-30 14:37:07 +08:00
```
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.
2025-09-16 16:17:10 +08:00
```bash
2025-11-04 22:06:41 +08:00
export VLLM_PRECOMPILED_WHEEL_LOCATION=https://github.com/vllm-project/vllm/releases/download/v0.11.0/vllm-0.11.0-cp38-abi3-manylinux1_x86_64.whl
2025-10-30 14:37:07 +08:00
```
2025-11-04 22:06:41 +08:00
Install vllm with command below (If you have no existing PyTorch).
2025-10-30 14:37:07 +08:00
```bash
uv pip install --editable .
```
2025-10-30 17:16:25 +08:00
2025-11-04 22:06:41 +08:00
Install vllm with command below (If you already have PyTorch).
```bash
python use_existing_torch.py
uv pip install -r requirements/build.txt
uv pip install --no-build-isolation --editable .
```
2025-11-05 10:46:05 +08:00
### Verification for successful installation of vLLM
2025-11-18 20:54:26 +08:00
Just run the command below. If no error, it demonstrates that the installation is successful.
2025-11-05 10:46:05 +08:00
```bash
python -c "import vllm._C"
```
2025-10-30 17:16:25 +08:00
### Installation of vLLM-omni
2025-10-25 12:24:05 +08:00
Install additional requirements for vllm-omni
2025-10-25 12:09:19 +08:00
```bash
2025-10-30 17:16:25 +08:00
git clone https://github.com/vllm-project/vllm-omni.git
cd vllm_omni
uv pip install -e .
2025-10-25 12:09:19 +08:00
```
2025-10-23 15:18:13 +08:00
## Run examples (Qwen2.5-omni)
2025-11-17 14:44:10 +08:00
Please check the folder of [examples](examples)
2025-11-05 23:26:58 +08:00
## Further details
2025-11-05 23:26:58 +08:00
For detailed architecture design, see [vllm_omni_design.md](docs/architecture/vllm_omni_design.md) and [high_level_arch_design.md](docs/architecture/high_level_arch_design.md).