Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
190 lines (173 loc) · 5.08 KB
/
Copy pathpyproject.toml
File metadata and controls
190 lines (173 loc) · 5.08 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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
[build-system]
requires = [
"setuptools>=61",
"wheel",
"setuptools-scm[toml]>=8",
"pybind11>=2.12",
"cmake>=3.16",
]
build-backend = "setuptools.build_meta"
[project]
name = "vllm-afd-plugin"
dynamic = ["version"]
description = "vLLM external plugin for Attention-FFN Disaggregation (AFD)"
readme = "README.md"
requires-python = ">=3.10,<3.14"
license = "Apache-2.0"
license-files = ["LICENSE"]
authors = [{ name = "AFD plugin contributors" }]
keywords = ["vllm", "afd", "attention", "ffn", "disaggregation", "inference"]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"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 = []
# Keep vLLM optional so macOS and CPU-only development can run import/config tests.
# Install the runtime extra only in environments with a compatible vLLM wheel.
[project.optional-dependencies]
vllm = ["vllm==0.26.0"]
[project.urls]
Homepage = "https://github.com/vllm-project/afd-plugin"
Repository = "https://github.com/vllm-project/afd-plugin"
Documentation = "https://github.com/vllm-project/afd-plugin#readme"
"Bug Tracker" = "https://github.com/vllm-project/afd-plugin/issues"
[project.entry-points."vllm.general_plugins"]
afd = "afd_plugin:register_afd"
[dependency-groups]
dev = [
"datasets>=3.0",
"httpx>=0.27",
"huggingface_hub>=0.26",
"pre-commit>=4",
"pytest>=7.0",
"ruff>=0.15.7,<0.16",
"setuptools-scm>=8",
]
e2e-tests = [
"lm_eval[api]==0.4.12",
]
[tool.setuptools_scm]
[tool.setuptools.packages.find]
where = ["."]
include = ["afd_plugin*"]
exclude = ["afd_plugin._cann_ops_custom*"]
namespaces = false
[tool.setuptools.package-data]
afd_plugin = ["py.typed", "_cann_ops_custom/**/*"]
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["."]
addopts = "-q"
markers = [
"vllm_runtime: tests requiring an importable vLLM runtime dependency.",
"gpu: GPU-gated AFD integration tests.",
"npu: NPU-gated AFD integration tests.",
"e2e: full end-to-end tests requiring model weights and hardware.",
"eval: accuracy/evaluation tests requiring datasets.",
"slow: tests that take more than 120 seconds.",
]
[tool.ruff]
line-length = 88
target-version = "py310"
extend-exclude = [".venv", "venv", "build", "dist"]
[tool.ruff.lint]
select = [
"E",
"F",
"I",
"N",
"UP",
"W",
"B",
"G",
"ISC",
"SIM",
]
[tool.ruff.lint.per-file-ignores]
"afd_plugin/compat/patches/**/*.py" = [
# Patch functions and copied upstream code intentionally keep upstream names.
"E501",
"N806",
"N807",
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
docstring-code-format = true
[tool.mypy]
python_version = "3.10"
# Silent follow for library code; missing third-party stubs are ignored
# everywhere (including tests). tests/ still get --follow-imports skip from
# tools/pre_commit/mypy.py.
ignore_missing_imports = true
check_untyped_defs = true
follow_imports = "silent"
[tool.ty]
[tool.ty.analysis]
allowed-unresolved-imports = ["torch.**", "vllm.**"]
[tool.typos.default]
extend-ignore-words-re = [
# Ascend domain terms checked as plain words in docs/comments.
"(?i)^cann$",
"(?i)^tbe$",
]
extend-ignore-identifiers-re = [
".*_thw",
".*thw",
"ein",
".*arange",
".*MoBA",
".*temperal_downsample",
".*nd",
".*[Nn][Dd]$",
".*_ND_.*",
".*NDExpectShape.*",
".*EmbedND$",
".*nothink.*",
".*NOTHINK.*",
".*nin.*",
".*[Oo]no.*[Aa]nna.*",
".*cann.*",
"alog",
".*alog.*",
".*[Nn][Dd]3.*",
".*updator.*",
"byt5.*",
# NemotronVoiceChat vendored triton kernel: dout/DOUT abbreviate d_out
# (output feature dim), not "doubt".
".*dout.*",
".*DOUT.*",
# Vendored CANN/AscendC identifiers under csrc/npu/ascend_kernels/ whose
# camelCase segments spell a word the dictionary flags. These are part of
# the CANN API surface (renaming them breaks compilation against the CANN
# headers) or upstream spellings kept as-is so the vendored tree stays
# diffable against its origin. The `nd`/`ND` entries above only match a
# trailing or all-lowercase `nd`, not a mid-identifier camelCase segment.
# ND->NZ copies and their stride/param names.
".*[Nn]d2[Nn]z.*",
".*[Nn]d[A-Z].*",
# ND_ALIGN, ND_WEIGHT_DIM_LIMIT, ND_WEIGHT_MULTI_TENSOR_DIM, MIN_ND_DIM.
".*ND_WEIGHT.*",
".*MIN_ND_DIM.*",
".*ND_ALIGN.*",
# CANN registration macro.
".*REGIST_MATMUL_OBJ.*",
# Upstream-spelled local names: preGoupList, reformatedTensor,
# reformatedWeight, isFisrtBlock, copyedL1Left, worskspaceOffset,
# DataCopyPad2DA8W4NDNew, isND2NZ, enVecND2NZ.
".*[Gg]oup.*",
".*reformated.*",
".*Fisrt.*",
".*copyed.*",
".*worskspace.*",
"DataCopyPad2DA8W4NDNew",
".*isND2NZ.*",
".*enVecND2NZ.*",
]