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

5
6
7
8
9
10
[tool.setuptools_scm]
root = ".."
version_scheme = "guess-next-dev"
local_scheme = "node-and-date"
fallback_version = "0.4.4.post1"

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

[project.optional-dependencies]
25
runtime_common = [
26
    "datasets",
Lianmin Zheng's avatar
Lianmin Zheng committed
27
28
29
30
31
    "decord",
    "fastapi",
    "hf_transfer",
    "huggingface_hub",
    "interegular",
32
    "llguidance>=0.6.15",
Lianmin Zheng's avatar
Lianmin Zheng committed
33
    "modelscope",
34
    "ninja",
Lianmin Zheng's avatar
Lianmin Zheng committed
35
36
37
38
39
40
41
42
43
    "orjson",
    "packaging",
    "pillow",
    "prometheus-client>=0.20.0",
    "psutil",
    "pydantic",
    "python-multipart",
    "pyzmq>=25.1.2",
    "torchao>=0.7.0",
44
    "transformers==4.50.0",
Lianmin Zheng's avatar
Lianmin Zheng committed
45
46
    "uvicorn",
    "uvloop",
47
    "xgrammar==0.1.16",
48
]
49

50
srt = [
Lianmin Zheng's avatar
Lianmin Zheng committed
51
    "sglang[runtime_common]",
52
    "sgl-kernel==0.0.5.post3",
53
    "flashinfer_python==0.2.3",
Lianmin Zheng's avatar
Lianmin Zheng committed
54
55
56
    "torch==2.5.1",
    "vllm>=0.6.4.post1,<=0.7.2",
    "cuda-python",
57
    "outlines>=0.0.44,<=0.1.11",
58
]
59

60
# HIP (Heterogeneous-computing Interface for Portability) for AMD
61
# => base docker rocm/vllm-dev:20250114, not from public vllm whl
62
srt_hip = ["sglang[runtime_common]", "torch", "vllm==0.6.7.dev2", "outlines==0.1.11"]
Lianmin Zheng's avatar
Lianmin Zheng committed
63

64
65
# xpu is not enabled in public vllm and torch whl,
# need to follow https://docs.vllm.ai/en/latest/getting_started/xpu-installation.htmlinstall vllm
66
srt_xpu = ["sglang[runtime_common]", "outlines>=0.0.44,<=0.1.11"]
Lianmin Zheng's avatar
Lianmin Zheng committed
67
68
69
70
71

# 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"]

72
73
74
# CPU: currently, there are no pre-built vllm wheels for CPU.
# To install vllm for CPU, please follow the instruction here:
# https://docs.vllm.ai/en/latest/getting_started/installation/cpu/index.html
Lianmin Zheng's avatar
Lianmin Zheng committed
75
srt_cpu = ["sglang[runtime_common]", "outlines>=0.0.44,<=0.1.11", "torch"]
76

77
78
openai = ["openai>=1.0", "tiktoken"]
anthropic = ["anthropic>=0.20.0"]
胡译文's avatar
胡译文 committed
79
litellm = ["litellm>=1.0.0"]
80
torch_memory_saver = ["torch_memory_saver"]
81
82
83
84
85
86
87
88
test = [
    "jsonlines",
    "matplotlib",
    "pandas",
    "sentence_transformers",
    "accelerate",
    "peft",
]
胡译文's avatar
胡译文 committed
89
all = ["sglang[srt]", "sglang[openai]", "sglang[anthropic]", "sglang[litellm]"]
90
all_hip = ["sglang[srt_hip]", "sglang[openai]", "sglang[anthropic]", "sglang[litellm]"]
91
all_xpu = ["sglang[srt_xpu]", "sglang[openai]", "sglang[anthropic]", "sglang[litellm]"]
92
all_hpu = ["sglang[srt_hpu]", "sglang[openai]", "sglang[anthropic]", "sglang[litellm]"]
93
all_cpu = ["sglang[srt_cpu]", "sglang[openai]", "sglang[anthropic]", "sglang[litellm]"]
94

95
dev = ["sglang[all]", "sglang[test]"]
96
dev_hip = ["sglang[all_hip]", "sglang[test]"]
97
dev_xpu = ["sglang[all_xpu]", "sglang[test]"]
98
dev_hpu = ["sglang[all_hpu]", "sglang[test]"]
99
dev_cpu = ["sglang[all_cpu]", "sglang[test]"]
Lianmin Zheng's avatar
Lianmin Zheng committed
100

Lianmin Zheng's avatar
Lianmin Zheng committed
101
102
103
104
[project.urls]
"Homepage" = "https://github.com/sgl-project/sglang"
"Bug Tracker" = "https://github.com/sgl-project/sglang/issues"

yudian0504's avatar
yudian0504 committed
105
[tool.setuptools.package-data]
106
107
108
109
"sglang" = [
    "srt/layers/moe/fused_moe_triton/configs/*.json",
    "srt/layers/quantization/configs/*.json",
]
yudian0504's avatar
yudian0504 committed
110

Lianmin Zheng's avatar
Lianmin Zheng committed
111
[tool.setuptools.packages.find]
112
113
114
115
116
117
118
119
120
exclude = [
    "assets*",
    "benchmark*",
    "docs*",
    "dist*",
    "playground*",
    "scripts*",
    "tests*",
]
Lianmin Zheng's avatar
Lianmin Zheng committed
121
122

[tool.wheel]
123
124
125
126
127
128
129
130
131
exclude = [
    "assets*",
    "benchmark*",
    "docs*",
    "dist*",
    "playground*",
    "scripts*",
    "tests*",
]