pyproject.toml 4.26 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.9.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
    "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",
Lianmin Zheng's avatar
Lianmin Zheng committed
32
    "orjson",
33
    "outlines==0.1.11",
Lianmin Zheng's avatar
Lianmin Zheng committed
34
    "packaging",
35
    "partial_json_parser",
Lianmin Zheng's avatar
Lianmin Zheng committed
36
37
38
39
    "pillow",
    "prometheus-client>=0.20.0",
    "psutil",
    "pydantic",
40
    "pynvml",
41
    "pybase64",
Lianmin Zheng's avatar
Lianmin Zheng committed
42
43
    "python-multipart",
    "pyzmq>=25.1.2",
44
    "sentencepiece",
Mick's avatar
Mick committed
45
    "soundfile==0.13.1",
46
    "scipy",
Lianmin Zheng's avatar
Lianmin Zheng committed
47
    "torchao==0.9.0",
48
    "transformers==4.54.0",
49
    "timm==1.0.16",
Lianmin Zheng's avatar
Lianmin Zheng committed
50
51
    "uvicorn",
    "uvloop",
52
    "xgrammar==0.1.21",
53
]
54

55
srt = [
Lianmin Zheng's avatar
Lianmin Zheng committed
56
    "sglang[runtime_common]",
57
    "sgl-kernel==0.2.7",
58
59
60
    "torch==2.7.1",
    "torchaudio==2.7.1",
    "torchvision==0.22.1",
Lianmin Zheng's avatar
Lianmin Zheng committed
61
    "cuda-python",
62
    "einops",
63
    "flashinfer_python==0.2.9rc2",
64
]
65

66
67
68
blackwell = [
    "sglang[runtime_common]",
    "sgl-kernel",
69
70
    "torch==2.7.1",
    "torchaudio==2.7.1",
71
    "torchvision==0.22.1",
72
73
    "cuda-python",
    "einops",
74
    "flashinfer_python==0.2.9rc2",
Yineng Zhang's avatar
Yineng Zhang committed
75
    "tiktoken",
76
77
]

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

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

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

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

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

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

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

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

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

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

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