forked from waybarrios/vllm-mlx
-
Notifications
You must be signed in to change notification settings - Fork 56
Expand file tree
/
Copy pathpyproject.toml
More file actions
170 lines (157 loc) · 4.52 KB
/
pyproject.toml
File metadata and controls
170 lines (157 loc) · 4.52 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "rapid-mlx"
version = "0.3.12"
description = "Rapid-MLX — AI inference for Apple Silicon. Drop-in OpenAI API, 2-4x faster than Ollama."
readme = "README.md"
license = {text = "Apache-2.0"}
requires-python = ">=3.10"
authors = [
{name = "vllm-mlx contributors"}
]
keywords = ["llm", "mlx", "apple-silicon", "vllm", "inference", "transformers"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Operating System :: MacOS",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
dependencies = [
# Core — these are all you need for `rapid-mlx serve <text-model>`
"mlx>=0.29.0",
"mlx-lm>=0.30.5",
"transformers>=5.0.0",
"tokenizers>=0.19.0",
"huggingface-hub>=0.23.0",
"numpy>=1.24.0",
"pillow>=10.0.0",
"tqdm>=4.66.0",
"pyyaml>=6.0",
"requests>=2.28.0",
"tabulate>=0.9.0",
"psutil>=5.9.0",
"fastapi>=0.100.0",
"uvicorn>=0.23.0",
"mcp>=1.0.0",
"jsonschema>=4.0.0",
]
[project.optional-dependencies]
# Vision models (Qwen-VL, etc.) — adds ~2.5 GB
vision = [
"mlx-vlm>=0.1.0",
"opencv-python>=4.8.0",
"torch>=2.3.0",
"torchvision>=0.18.0",
]
# Embedding endpoint
embeddings = [
"mlx-embeddings>=0.0.5",
]
# Gradio chat UI
chat = [
"gradio>=4.0.0",
"pytz>=2024.1",
]
# All extras — matches pre-0.3.1 behavior
all = [
"rapid-mlx[vision,chat,embeddings]",
]
dev = [
"pytest>=7.0.0",
"pytest-asyncio>=0.21.0",
"black>=23.0.0",
"ruff>=0.1.0",
"mypy>=1.0.0",
]
vllm = [
"vllm>=0.4.0",
]
# Guided decoding with outlines for structured JSON output
guided = [
"outlines[mlxlm]>=1.0.0",
]
# Audio dependencies for TTS/STT (mlx-audio)
audio = [
"mlx-audio>=0.2.9",
"sounddevice>=0.4.0",
"soundfile>=0.12.0",
"scipy>=1.10.0",
"numba>=0.57.0",
"tiktoken>=0.5.0",
"misaki[zh,ja]>=0.5.0", # Chinese (zh) and Japanese (ja) support
"spacy>=3.7.0",
"num2words>=0.5.0",
"loguru>=0.7.0",
"phonemizer>=3.2.0",
# Additional multilingual dependencies
"ordered_set>=4.1.0", # Required for Chinese TTS
"cn2an>=0.5.0", # Chinese number conversion
"fugashi>=1.3.0", # Japanese tokenizer
"unidic-lite>=1.0.0", # Japanese dictionary for fugashi
"jieba>=0.42.0", # Chinese word segmentation
]
[project.urls]
Homepage = "https://github.com/raullenchai/Rapid-MLX"
Documentation = "https://github.com/raullenchai/Rapid-MLX#readme"
Repository = "https://github.com/raullenchai/Rapid-MLX"
[project.entry-points."vllm.platform_plugins"]
mlx = "vllm_mlx.plugin:mlx_platform_plugin"
[project.scripts]
rapid-mlx = "vllm_mlx.cli:main"
vllm-mlx = "vllm_mlx.cli:main"
vllm-mlx-chat = "vllm_mlx.gradio_app:main"
vllm-mlx-bench = "vllm_mlx.benchmark:main"
[tool.setuptools.package-data]
vllm_mlx = ["aliases.json"]
[tool.setuptools.packages.find]
where = ["."]
include = ["vllm_mlx*"]
[tool.black]
line-length = 88
target-version = ["py310", "py311", "py312", "py313"]
[tool.ruff]
line-length = 88
[tool.ruff.lint]
select = ["E", "F", "W", "I", "N", "UP", "B", "SIM"]
ignore = [
"E402", # module-level import not at top
"E501", # line too long
"E731", # lambda assignment
"F811", # redefined unused
"F841", # unused variable
"B004", # unreliable callable check
"B007", # unused loop variable
"B008", # function call in default arg
"B011", # assert false
"B017", # assert raises exception
"B905", # zip without strict
"N801", # class name casing
"N806", # variable in function casing
"SIM103", # needless bool
"SIM108", # ternary instead of if-else
"SIM110", # reimplemented builtin
"SIM222", # expr or true
"UP028", # yield in for loop
"SIM102", # collapsible if
"SIM105", # suppressible exception
"SIM115", # open file with context handler
"B904", # raise without from inside except
]
[tool.mypy]
python_version = "3.10"
warn_return_any = true
warn_unused_configs = true
ignore_missing_imports = true
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
asyncio_mode = "auto"