pyproject.toml 4.36 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"
Yineng Zhang's avatar
Yineng Zhang committed
7
version = "0.5.0rc0"
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
readme = "README.md"
10
requires-python = ">=3.9"
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
    "build",
22
    "compressed-tensors",
23
    "datasets",
Lianmin Zheng's avatar
Lianmin Zheng committed
24
25
26
27
    "fastapi",
    "hf_transfer",
    "huggingface_hub",
    "interegular",
28
    "llguidance>=0.7.11,<0.8.0",
Lianmin Zheng's avatar
Lianmin Zheng committed
29
    "modelscope",
30
    "msgspec",
31
    "ninja",
32
    "openai-harmony==0.0.3",
Lianmin Zheng's avatar
Lianmin Zheng committed
33
    "orjson",
34
    "outlines==0.1.11",
Lianmin Zheng's avatar
Lianmin Zheng committed
35
    "packaging",
36
    "partial_json_parser",
Lianmin Zheng's avatar
Lianmin Zheng committed
37
38
39
40
    "pillow",
    "prometheus-client>=0.20.0",
    "psutil",
    "pydantic",
41
    "pynvml",
42
    "pybase64",
Lianmin Zheng's avatar
Lianmin Zheng committed
43
44
    "python-multipart",
    "pyzmq>=25.1.2",
45
    "sentencepiece",
Mick's avatar
Mick committed
46
    "soundfile==0.13.1",
47
    "scipy",
Lianmin Zheng's avatar
Lianmin Zheng committed
48
    "torchao==0.9.0",
49
    "transformers==4.55.0",
50
    "timm==1.0.16",
Lianmin Zheng's avatar
Lianmin Zheng committed
51
52
    "uvicorn",
    "uvloop",
Swipe4057's avatar
Swipe4057 committed
53
    "xgrammar==0.1.22",
54
]
55

56
srt = [
Lianmin Zheng's avatar
Lianmin Zheng committed
57
    "sglang[runtime_common]",
58
59
60
61
    "sgl-kernel==0.3.2",
    "torch==2.8.0",
    "torchaudio==2.8.0",
    "torchvision",
Lianmin Zheng's avatar
Lianmin Zheng committed
62
    "cuda-python",
63
    "einops",
64
    "flashinfer_python==0.2.10",
65
]
66

67
68
69
blackwell = [
    "sglang[runtime_common]",
    "sgl-kernel",
70
71
72
    "torch==2.8.0",
    "torchaudio==2.8.0",
    "torchvision",
73
74
    "cuda-python",
    "einops",
75
    "flashinfer_python==0.2.10",
Yineng Zhang's avatar
Yineng Zhang committed
76
    "tiktoken",
Yineng Zhang's avatar
Yineng Zhang committed
77
    "openai==1.99.1",
78
79
]

80
# HIP (Heterogeneous-computing Interface for Portability) for AMD
81
# => base docker rocm/vllm-dev:20250114, not from public vllm whl
82
83
84
srt_hip = [
    "sglang[runtime_common]",
    "torch",
85
    "petit_kernel==0.0.2",
86
]
Lianmin Zheng's avatar
Lianmin Zheng committed
87

88
# xpu is not enabled in public vllm and torch whl,
89
# need to follow https://docs.vllm.ai/en/latest/getting_started/xpu-installation.htmlinstall vllm
90
srt_xpu = ["sglang[runtime_common]"]
Lianmin Zheng's avatar
Lianmin Zheng committed
91
92
93

# For Intel Gaudi(device : hpu) follow the installation guide
# https://docs.vllm.ai/en/latest/getting_started/gaudi-installation.html
94
srt_hpu = ["sglang[runtime_common]"]
Lianmin Zheng's avatar
Lianmin Zheng committed
95

96
# CPU: torch wheel for CPU needs to be installed from https://download.pytorch.org/whl/cpu
97
srt_cpu = ["sglang[runtime_common]", "einops"]
98
# https://vllm-ascend.readthedocs.io/en/latest/installation.html
99
srt_npu = ["sglang[runtime_common]"]
100

Yineng Zhang's avatar
Yineng Zhang committed
101
openai = ["openai==1.99.1", "tiktoken"]
102
anthropic = ["anthropic>=0.20.0"]
胡译文's avatar
胡译文 committed
103
litellm = ["litellm>=1.0.0"]
104
torch_memory_saver = ["torch_memory_saver>=0.0.8"]
105
decord = ["decord"]
106
test = [
107
    "accelerate",
108
109
110
111
    "jsonlines",
    "matplotlib",
    "pandas",
    "peft",
112
    "sentence_transformers",
fzyzcjy's avatar
fzyzcjy committed
113
    "pytest",
114
]
115
116
117
118
119
120
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]"]
121

122
dev = ["sglang[all]", "sglang[test]"]
123
dev_hip = ["sglang[all_hip]", "sglang[test]"]
124
dev_xpu = ["sglang[all_xpu]", "sglang[test]"]
125
dev_hpu = ["sglang[all_hpu]", "sglang[test]"]
126
dev_cpu = ["sglang[all_cpu]", "sglang[test]"]
Lianmin Zheng's avatar
Lianmin Zheng committed
127

Lianmin Zheng's avatar
Lianmin Zheng committed
128
129
130
131
[project.urls]
"Homepage" = "https://github.com/sgl-project/sglang"
"Bug Tracker" = "https://github.com/sgl-project/sglang/issues"

yudian0504's avatar
yudian0504 committed
132
[tool.setuptools.package-data]
133
"sglang" = [
134
    "srt/layers/moe/fused_moe_triton/configs/*/*.json",
135
    "srt/layers/quantization/configs/*.json",
136
    "srt/mem_cache/storage/hf3fs/hf3fs_utils.cpp",
137
]
yudian0504's avatar
yudian0504 committed
138

Lianmin Zheng's avatar
Lianmin Zheng committed
139
[tool.setuptools.packages.find]
140
141
142
143
144
145
146
147
148
exclude = [
    "assets*",
    "benchmark*",
    "docs*",
    "dist*",
    "playground*",
    "scripts*",
    "tests*",
]
Lianmin Zheng's avatar
Lianmin Zheng committed
149
150

[tool.wheel]
151
152
153
154
155
156
157
158
159
exclude = [
    "assets*",
    "benchmark*",
    "docs*",
    "dist*",
    "playground*",
    "scripts*",
    "tests*",
]
160
161
162
163

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