Skip to content

Commit 6522c48

Browse files
Merge pull request #1 from hsliuustc0106/hsliu-dev-C
init the folder directories for vLLM-omni
2 parents 089fa0e + dcb8868 commit 6522c48

27 files changed

+677
-59
lines changed

.gitignore

Lines changed: 82 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Byte-compiled / optimized / DLL files
22
__pycache__/
3-
*.py[codz]
3+
*.py[cod]
44
*$py.class
55

66
# C extensions
@@ -46,7 +46,7 @@ htmlcov/
4646
nosetests.xml
4747
coverage.xml
4848
*.cover
49-
*.py.cover
49+
*.py,cover
5050
.hypothesis/
5151
.pytest_cache/
5252
cover/
@@ -94,35 +94,20 @@ ipython_config.py
9494
# install all needed dependencies.
9595
#Pipfile.lock
9696

97-
# UV
98-
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99-
# This is especially recommended for binary packages to ensure reproducibility, and is more
100-
# commonly ignored for libraries.
101-
#uv.lock
102-
10397
# poetry
10498
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
10599
# This is especially recommended for binary packages to ensure reproducibility, and is more
106100
# commonly ignored for libraries.
107101
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108102
#poetry.lock
109-
#poetry.toml
110103

111104
# pdm
112105
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
113-
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
114-
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
115106
#pdm.lock
116-
#pdm.toml
117-
.pdm-python
118-
.pdm-build/
119-
120-
# pixi
121-
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
122-
#pixi.lock
123-
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
124-
# in the .venv directory. It is recommended not to include this directory in version control.
125-
.pixi
107+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108+
# in version control.
109+
# https://pdm.fming.dev/#use-with-ide
110+
.pdm.toml
126111

127112
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
128113
__pypackages__/
@@ -136,7 +121,6 @@ celerybeat.pid
136121

137122
# Environments
138123
.env
139-
.envrc
140124
.venv
141125
env/
142126
venv/
@@ -170,38 +154,79 @@ cython_debug/
170154

171155
# PyCharm
172156
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
173-
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
174-
# and can be added to the global gitignore or merged into this file. For a more nuclear
175-
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
176-
#.idea/
177-
178-
# Abstra
179-
# Abstra is an AI-powered process automation framework.
180-
# Ignore directories containing user credentials, local state, and settings.
181-
# Learn more at https://abstra.io/docs
182-
.abstra/
183-
184-
# Visual Studio Code
185-
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
186-
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
187-
# and can be added to the global gitignore or merged into this file. However, if you prefer,
188-
# you could uncomment the following to ignore the entire vscode folder
189-
# .vscode/
190-
191-
# Ruff stuff:
192-
.ruff_cache/
193-
194-
# PyPI configuration file
195-
.pypirc
196-
197-
# Cursor
198-
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
199-
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
200-
# refer to https://docs.cursor.com/context/ignore-files
201-
.cursorignore
202-
.cursorindexingignore
203-
204-
# Marimo
205-
marimo/_static/
206-
marimo/_lsp/
207-
__marimo__/
157+
# be added to the global gitignore or merged into this project gitignore. For a PyCharm
158+
# project, it is recommended to include the following files:
159+
# .idea/
160+
# *.iml
161+
# *.ipr
162+
# *.iws
163+
# .idea/
164+
165+
# vLLM-omni specific
166+
# Model files and checkpoints
167+
models/
168+
checkpoints/
169+
*.bin
170+
*.safetensors
171+
*.pt
172+
*.pth
173+
174+
# Cache directories
175+
cache/
176+
.cache/
177+
diffusion_cache/
178+
kv_cache/
179+
180+
# Logs
181+
logs/
182+
*.log
183+
184+
# Temporary files
185+
tmp/
186+
temp/
187+
.tmp/
188+
189+
# IDE files
190+
.vscode/
191+
.idea/
192+
*.swp
193+
*.swo
194+
*~
195+
196+
# OS files
197+
.DS_Store
198+
.DS_Store?
199+
._*
200+
.Spotlight-V100
201+
.Trashes
202+
ehthumbs.db
203+
Thumbs.db
204+
205+
# Data files
206+
data/
207+
datasets/
208+
*.csv
209+
*.json
210+
*.jsonl
211+
*.parquet
212+
213+
# Output files
214+
outputs/
215+
results/
216+
generated/
217+
218+
# Configuration overrides
219+
configs/local.yaml
220+
configs/production.yaml
221+
configs/development.yaml
222+
223+
# Docker
224+
.dockerignore
225+
Dockerfile.dev
226+
227+
# Kubernetes
228+
k8s/
229+
*.yaml
230+
*.yml
231+
!configs/*.yaml
232+
!configs/*.yml

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
# vllm-omni
2-
vLLM-omni supports multi-modality models inference and serving with non-autoregressive structures and non-textual outputs, extending vLLM beyond traditional text-based, autoregressive generation.
1+
# vLLM-omni: Multi-modal Extension for vLLM
2+
3+
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.

docs/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# vLLM-omni Documentation
2+
3+
Welcome to the vLLM-omni documentation! This documentation provides comprehensive information about using and developing with vLLM-omni.
4+
5+
# TODO (add examples)

docs/architecture/vLLM-omni arch design doc.md

Lines changed: 139 additions & 0 deletions
Large diffs are not rendered by default.

examples/README.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# vLLM-omni Examples
2+
3+
This directory contains examples demonstrating how to use vLLM-omni for various tasks.
4+
5+
## Basic Examples
6+
7+
- [Text Generation](basic/text_generation.py) - Basic text generation using AR models
8+
- [Image Generation](basic/image_generation.py) - Image generation using diffusion models
9+
- [Multimodal Processing](basic/multimodal_processing.py) - Processing text and images together
10+
11+
## Advanced Examples
12+
13+
- [Custom Model Integration](advanced/custom_model.py) - Integrating custom models
14+
- [Batch Processing](advanced/batch_processing.py) - Efficient batch processing
15+
- [Streaming Output](advanced/streaming.py) - Real-time streaming output
16+
17+
## Multimodal Examples
18+
19+
- [Image-to-Text](multimodal/image_to_text.py) - Image captioning and description
20+
- [Text-to-Image](multimodal/text_to_image.py) - Text-to-image generation
21+
- [Audio Processing](multimodal/audio_processing.py) - Audio generation and processing
22+
- [Video Generation](multimodal/video_generation.py) - Video generation workflows
23+
24+
## API Examples
25+
26+
- [REST API](api/rest_api.py) - Using the REST API interface
27+
- [Gradio Interface](api/gradio_interface.py) - Creating Gradio web interfaces
28+
- [ComfyUI Integration](api/comfyui_integration.py) - ComfyUI workflow integration
29+
30+
## Configuration Examples
31+
32+
- [Custom Configuration](config/custom_config.py) - Custom configuration setup
33+
- [Multi-GPU Setup](config/multi_gpu.py) - Multi-GPU configuration
34+
- [Distributed Processing](config/distributed.py) - Distributed processing setup
35+
36+
## Getting Started
37+
38+
1. Install vLLM-omni:
39+
```bash
40+
pip install vllm-omni
41+
```
42+
43+
2. Run a basic example:
44+
```bash
45+
python examples/basic/text_generation.py
46+
```
47+
48+
3. Explore the examples in each subdirectory for more advanced usage.
49+
50+
## Requirements
51+
52+
Most examples require additional dependencies. Install them with:
53+
54+
```bash
55+
pip install -r requirements.txt
56+
```
57+
58+
For development examples, install the development dependencies:
59+
60+
```bash
61+
pip install -r requirements-dev.txt
62+
```

pyproject.toml

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
[build-system]
2+
requires = ["setuptools>=61.0", "wheel"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "vllm-omni"
7+
version = "0.1.0"
8+
description = "vLLM-omni: Multi-modality models inference and serving with non-autoregressive structures"
9+
readme = "README.md"
10+
requires-python = ">=3.8"
11+
license = {text = "Apache-2.0"}
12+
authors = [
13+
{name = "vLLM-omni Team", email = "hsliuustc@gmail.com"}
14+
]
15+
keywords = ["vllm", "multimodal", "diffusion", "transformer", "inference", "serving"]
16+
classifiers = [
17+
"Development Status :: 3 - Alpha",
18+
"Intended Audience :: Developers",
19+
"Intended Audience :: Science/Research",
20+
"License :: OSI Approved :: Apache Software License",
21+
"Programming Language :: Python :: 3",
22+
"Programming Language :: Python :: 3.8",
23+
"Programming Language :: Python :: 3.9",
24+
"Programming Language :: Python :: 3.10",
25+
"Programming Language :: Python :: 3.11",
26+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
27+
"Topic :: Software Development :: Libraries :: Python Modules",
28+
]
29+
30+
dependencies = [
31+
"vllm>=0.2.0",
32+
"torch>=2.0.0",
33+
"transformers>=4.30.0",
34+
"numpy>=1.21.0",
35+
"pillow>=8.0.0",
36+
"opencv-python>=4.5.0",
37+
"gradio>=3.0.0",
38+
"fastapi>=0.100.0",
39+
"uvicorn>=0.20.0",
40+
"pydantic>=2.0.0",
41+
"asyncio-mqtt>=0.11.0",
42+
"ray>=2.0.0",
43+
]
44+
45+
[project.optional-dependencies]
46+
dev = [
47+
"pytest>=7.0.0",
48+
"pytest-asyncio>=0.21.0",
49+
"pytest-cov>=4.0.0",
50+
"black>=23.0.0",
51+
"isort>=5.12.0",
52+
"flake8>=6.0.0",
53+
"mypy>=1.0.0",
54+
"pre-commit>=3.0.0",
55+
]
56+
docs = [
57+
"sphinx>=6.0.0",
58+
"sphinx-rtd-theme>=1.2.0",
59+
"myst-parser>=1.0.0",
60+
]
61+
examples = [
62+
"jupyter>=1.0.0",
63+
"matplotlib>=3.5.0",
64+
"seaborn>=0.11.0",
65+
]
66+
67+
[project.urls]
68+
Homepage = "https://github.com/hsliuustc0106/vllm-omni"
69+
Repository = "https://github.com/hsliuustc0106/vllm-omni"
70+
Documentation = "https://vllm-omni.readthedocs.io"
71+
"Bug Tracker" = "https://github.com/hsliuustc0106/vllm-omni/issues"
72+
73+
[project.scripts]
74+
vllm-omni = "vllm_omni.cli:main"
75+
76+
[tool.setuptools.packages.find]
77+
where = ["."]
78+
include = ["vllm_omni*"]
79+
80+
[tool.black]
81+
line-length = 88
82+
target-version = ['py38', 'py39', 'py310', 'py311']
83+
include = '\.pyi?$'
84+
extend-exclude = '''
85+
/(
86+
# directories
87+
\.eggs
88+
| \.git
89+
| \.hg
90+
| \.mypy_cache
91+
| \.tox
92+
| \.venv
93+
| build
94+
| dist
95+
)/
96+
'''
97+
98+
[tool.isort]
99+
profile = "black"
100+
multi_line_output = 3
101+
line_length = 88
102+
known_first_party = ["vllm_omni"]
103+
104+
[tool.mypy]
105+
python_version = "3.8"
106+
warn_return_any = true
107+
warn_unused_configs = true
108+
disallow_untyped_defs = true
109+
disallow_incomplete_defs = true
110+
check_untyped_defs = true
111+
disallow_untyped_decorators = true
112+
no_implicit_optional = true
113+
warn_redundant_casts = true
114+
warn_unused_ignores = true
115+
warn_no_return = true
116+
warn_unreachable = true
117+
strict_equality = true
118+
119+
[tool.pytest.ini_options]
120+
testpaths = ["tests"]
121+
python_files = ["test_*.py", "*_test.py"]
122+
python_classes = ["Test*"]
123+
python_functions = ["test_*"]
124+
addopts = [
125+
"--strict-markers",
126+
"--strict-config",
127+
"--cov=vllm_omni",
128+
"--cov-report=term-missing",
129+
"--cov-report=html",
130+
"--cov-report=xml",
131+
]
132+
markers = [
133+
"unit: Unit tests",
134+
"integration: Integration tests",
135+
"benchmark: Benchmark tests",
136+
"slow: Slow tests",
137+
]

0 commit comments

Comments
 (0)