pyproject.toml 4.41 KB
Newer Older
Lianmin Zheng's avatar
Lianmin Zheng committed
1
[build-system]
Yineng Zhang's avatar
Yineng Zhang committed
2
requires = ["setuptools>=61.0", "wheel"]
Lianmin Zheng's avatar
Lianmin Zheng committed
3
4
5
6
build-backend = "setuptools.build_meta"

[project]
name = "sglang"
7
version = "0.4.6.post5"
8
description = "SGLang is yet another fast serving framework for large language models and vision language models."
Lianmin Zheng's avatar
Lianmin Zheng committed
9
10
readme = "README.md"
requires-python = ">=3.8"
11
license = { file = "LICENSE" }
Lianmin Zheng's avatar
Lianmin Zheng committed
12
13
14
15
classifiers = [
    "Programming Language :: Python :: 3",
    "License :: OSI Approved :: Apache Software License",
]
16
dependencies = ["aiohttp", "requests", "tqdm", "numpy", "IPython", "setproctitle"]
Lianmin Zheng's avatar
Lianmin Zheng committed
17
18

[project.optional-dependencies]
19
runtime_common = [
20
    "blobfile==3.0.0",
21
    "compressed-tensors",
22
    "datasets",
Lianmin Zheng's avatar
Lianmin Zheng committed
23
24
25
26
    "fastapi",
    "hf_transfer",
    "huggingface_hub",
    "interegular",
27
    "llguidance>=0.7.11,<0.8.0",
Lianmin Zheng's avatar
Lianmin Zheng committed
28
    "modelscope",
29
    "msgspec",
30
    "ninja",
Lianmin Zheng's avatar
Lianmin Zheng committed
31
32
    "orjson",
    "packaging",
33
    "partial_json_parser",
Lianmin Zheng's avatar
Lianmin Zheng committed
34
35
36
37
    "pillow",
    "prometheus-client>=0.20.0",
    "psutil",
    "pydantic",
38
    "pynvml",
Lianmin Zheng's avatar
Lianmin Zheng committed
39
40
    "python-multipart",
    "pyzmq>=25.1.2",
Mick's avatar
Mick committed
41
    "soundfile==0.13.1",
42
    "scipy",
Lianmin Zheng's avatar
Lianmin Zheng committed
43
    "torchao==0.9.0",
44
    "transformers==4.52.3",
Lianmin Zheng's avatar
Lianmin Zheng committed
45
46
    "uvicorn",
    "uvloop",
47
    "xgrammar==0.1.19",
48
]
49

50
srt = [
Lianmin Zheng's avatar
Lianmin Zheng committed
51
    "sglang[runtime_common]",
52
    "sgl-kernel==0.1.5",
53
    "flashinfer_python==0.2.5",
lukec's avatar
lukec committed
54
55
    "torch==2.6.0",
    "torchvision==0.21.0",
Lianmin Zheng's avatar
Lianmin Zheng committed
56
    "cuda-python",
57
    "outlines>=0.0.44,<=0.1.11",
58
    "einops",
59
]
60

61
62
63
blackwell = [
    "sglang[runtime_common]",
    "sgl-kernel",
Qiaolin Yu's avatar
Qiaolin Yu committed
64
65
    "torch==2.7.0",
    "torchvision==0.22.0",
66
67
68
    "cuda-python",
    "outlines>=0.0.44,<=0.1.11",
    "einops",
69
    "flashinfer_python==0.2.5",
70
71
]

72
# HIP (Heterogeneous-computing Interface for Portability) for AMD
73
# => base docker rocm/vllm-dev:20250114, not from public vllm whl
74
75
76
77
78
79
srt_hip = [
    "sglang[runtime_common]",
    "torch",
    "vllm==0.6.7.dev2",
    "outlines==0.1.11"
]
Lianmin Zheng's avatar
Lianmin Zheng committed
80

81
# xpu is not enabled in public vllm and torch whl,
82
# need to follow https://docs.vllm.ai/en/latest/getting_started/xpu-installation.htmlinstall vllm
83
srt_xpu = ["sglang[runtime_common]", "outlines>=0.0.44,<=0.1.11"]
Lianmin Zheng's avatar
Lianmin Zheng committed
84
85
86
87
88

# For Intel Gaudi(device : hpu) follow the installation guide
# https://docs.vllm.ai/en/latest/getting_started/gaudi-installation.html
srt_hpu = ["sglang[runtime_common]", "outlines>=0.0.44,<=0.1.11"]

89
90
# CPU: currently, there are no pre-built vllm wheels for CPU.
# To install vllm for CPU, please follow the instruction here:
91
# https://docs.vllm.ai/en/latest/getting_started/installation/cpu/index.html
Lianmin Zheng's avatar
Lianmin Zheng committed
92
srt_cpu = ["sglang[runtime_common]", "outlines>=0.0.44,<=0.1.11", "torch"]
93
94
# https://vllm-ascend.readthedocs.io/en/latest/installation.html
srt_npu = ["sglang[runtime_common]", "outlines>=0.0.44,<=0.1.11"]
95

96
97
openai = ["openai>=1.0", "tiktoken"]
anthropic = ["anthropic>=0.20.0"]
胡译文's avatar
胡译文 committed
98
litellm = ["litellm>=1.0.0"]
99
torch_memory_saver = ["torch_memory_saver>=0.0.4"]
100
decord = ["decord"]
101
test = [
102
    "accelerate",
103
104
105
106
    "jsonlines",
    "matplotlib",
    "pandas",
    "peft",
107
108
    "timm",
    "sentence_transformers",
109
]
110
111
112
113
114
115
all = ["sglang[srt]", "sglang[openai]", "sglang[anthropic]", "sglang[litellm]", "sglang[torch_memory_saver]", "sglang[decord]"]
all_hip = ["sglang[srt_hip]", "sglang[openai]", "sglang[anthropic]", "sglang[litellm]", "sglang[decord]"]
all_xpu = ["sglang[srt_xpu]", "sglang[openai]", "sglang[anthropic]", "sglang[litellm]", "sglang[decord]"]
all_hpu = ["sglang[srt_hpu]", "sglang[openai]", "sglang[anthropic]", "sglang[litellm]", "sglang[decord]"]
all_cpu = ["sglang[srt_cpu]", "sglang[openai]", "sglang[anthropic]", "sglang[litellm]", "sglang[decord]"]
all_npu = ["sglang[srt_npu]", "sglang[openai]", "sglang[anthropic]", "sglang[litellm]", "sglang[decord]"]
116

117
dev = ["sglang[all]", "sglang[test]"]
118
dev_hip = ["sglang[all_hip]", "sglang[test]"]
119
dev_xpu = ["sglang[all_xpu]", "sglang[test]"]
120
dev_hpu = ["sglang[all_hpu]", "sglang[test]"]
121
dev_cpu = ["sglang[all_cpu]", "sglang[test]"]
Lianmin Zheng's avatar
Lianmin Zheng committed
122

Lianmin Zheng's avatar
Lianmin Zheng committed
123
124
125
126
[project.urls]
"Homepage" = "https://github.com/sgl-project/sglang"
"Bug Tracker" = "https://github.com/sgl-project/sglang/issues"

yudian0504's avatar
yudian0504 committed
127
[tool.setuptools.package-data]
128
129
130
131
"sglang" = [
    "srt/layers/moe/fused_moe_triton/configs/*.json",
    "srt/layers/quantization/configs/*.json",
]
yudian0504's avatar
yudian0504 committed
132

Lianmin Zheng's avatar
Lianmin Zheng committed
133
[tool.setuptools.packages.find]
134
135
136
137
138
139
140
141
142
exclude = [
    "assets*",
    "benchmark*",
    "docs*",
    "dist*",
    "playground*",
    "scripts*",
    "tests*",
]
Lianmin Zheng's avatar
Lianmin Zheng committed
143
144

[tool.wheel]
145
146
147
148
149
150
151
152
153
exclude = [
    "assets*",
    "benchmark*",
    "docs*",
    "dist*",
    "playground*",
    "scripts*",
    "tests*",
]
154
155
156
157

[tool.codespell]
ignore-words-list = "ans, als, hel, boostrap, childs, te, vas, hsa, ment"
skip = "*.json,*.jsonl,*.patch,*.txt"