-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathpyproject.toml
More file actions
105 lines (95 loc) · 3.21 KB
/
pyproject.toml
File metadata and controls
105 lines (95 loc) · 3.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# SPDX-License-Identifier: Apache-2.0
[build-system]
requires = ["maturin>=1.4,<2.0"]
build-backend = "maturin"
[project]
name = "vllm-metal"
version = "0.1.0"
description = "vLLM hardware plugin for Apple Silicon - unifies MLX and PyTorch under a single lowering path"
readme = "README.md"
license = {text = "Apache-2.0"}
requires-python = ">=3.12,<3.14"
authors = [
{name = "vLLM Community"}
]
keywords = ["vllm", "metal", "mlx", "apple", "silicon", "mps", "llm", "inference", "rust"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Operating System :: MacOS :: MacOS X",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Rust",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
dependencies = [
# MLX - Required for Apple Silicon GPU acceleration
"mlx>=0.31.0; platform_system == 'Darwin' and platform_machine == 'arm64'",
"mlx-lm>=0.31.0; platform_system == 'Darwin' and platform_machine == 'arm64'",
"mlx-vlm>=0.4.0; platform_system == 'Darwin' and platform_machine == 'arm64'", # Vision-language model support
# Model loading and weights
"transformers>=5.0.0",
"accelerate>=0.26.0",
"safetensors>=0.4.0",
# Native Metal extension JIT build
"nanobind==2.10.2; platform_system == 'Darwin' and platform_machine == 'arm64'",
# Core utilities
"numpy>=1.24.0",
"psutil>=5.9.0",
]
[project.optional-dependencies]
stt = [
# Speech-to-text audio processing (Whisper models)
"librosa>=0.10.2",
"numba>=0.59.0", # Required by librosa on Python 3.12+
]
dev = [
"pytest>=9.0.2",
"pytest-asyncio>=0.21.0",
"ruff>=0.1.0",
"mypy>=1.19.1",
]
all = [
"vllm-metal[stt,dev]",
]
[project.urls]
Homepage = "https://github.com/vllm-project/vllm-metal"
Repository = "https://github.com/vllm-project/vllm-metal"
Issues = "https://github.com/vllm-project/vllm-metal/issues"
# vLLM Plugin Entry Points
[project.entry-points."vllm.platform_plugins"]
metal = "vllm_metal:register"
# Maturin configuration for mixed Rust/Python project
[tool.maturin]
# Build both the Rust extension and include Python source
features = ["pyo3/extension-module"]
# Include Python package in the wheel
python-source = "."
# Module name matches the Rust crate name
module-name = "vllm_metal._rs"
# Strip symbols for smaller binary
strip = true
[tool.ruff]
line-length = 88
target-version = "py312"
exclude = ["extern", ".venv*", "test_vllm.py", "target"]
[tool.ruff.lint]
select = ["E", "F", "W", "I", "N", "UP", "B", "C4"]
ignore = ["E501", "UP040"]
[tool.mypy]
python_version = "3.12"
warn_return_any = false
warn_unused_configs = true
ignore_missing_imports = true
# Disable strict checks for out-of-tree plugin compatibility
disable_error_code = ["override", "misc", "assignment", "arg-type", "index", "call-arg", "attr-defined"]
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
# By default, run all tests (including "slow"). Use `pytest -m "not slow"` for a
# fast loop (CI already does this).
markers = [
"slow: opt-in performance or long-running tests",
]