A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 15, 01:00 UTC
[CI] update typos config for CI pre-commit and fix some spells (#20919)
Signed-off-by: Peter Pan <Peter.Pan@daocloud.io>
Peter Pan committed
Jul 16, 2025 at 12:12 UTC
1eb2b9c10205b68658dede9dac73390706ef2e05
19 files changed
+200
-196
.pre-commit-config.yaml
+1
-1
@@ -21,7 +21,7 @@ repos:
21
- id: ruff-format
22
files: ^(.buildkite|benchmarks|examples)/.*
23
- repo: https://github.com/crate-ci/typos
24
- rev: v1.32.0
24
+ rev: v1.34.0
25
hooks:
26
- id: typos
27
- repo: https://github.com/PyCQA/isort
csrc/cpu/sgl-kernels/common.h
+1
-1
@@ -58,7 +58,7 @@ namespace {
58
59
#define CHECK_CONTIGUOUS(x) TORCH_CHECK(x.is_contiguous(), #x " must be contiguous")
60
#define CHECK_LAST_DIM_CONTIGUOUS(x) \
61
- TORCH_CHECK(x.strides()[x.strides().size() - 1] == 1, #x "must be contiguous at last dimention")
61
+ TORCH_CHECK(x.strides()[x.strides().size() - 1] == 1, #x "must be contiguous at last dimension")
62
63
#define CHECK_INPUT(x) \
64
CHECK_CPU(x); \
csrc/cpu/sgl-kernels/gemm.h
+1
-1
@@ -126,7 +126,7 @@ void fused_experts_int4_w4a16_kernel_impl(
126
int64_t topk,
127
int64_t num_tokens_post_pad);
128
129
-// shared expert implememntation for int8 w8a8
129
+// shared expert implementation for int8 w8a8
130
template <typename scalar_t>
131
void shared_expert_int8_kernel_impl(
132
scalar_t* __restrict__ output,
csrc/cpu/sgl-kernels/gemm_int8.cpp
+1
-1
@@ -41,7 +41,7 @@ struct tinygemm_kernel_nn<at::BFloat16, has_bias, BLOCK_M, BLOCK_N> {
41
__m512 vd0;
42
__m512 vd1[COLS];
43
44
- // oops! 4x4 spills but luckly we use 4x2
44
+ // oops! 4x4 spills but luckily we use 4x2
45
__m512 vbias[COLS];
46
47
// [NOTE]: s8s8 igemm compensation in avx512-vnni
csrc/cpu/sgl-kernels/vec.h
+1
-1
@@ -37,7 +37,7 @@ inline Vectorized<at::BFloat16> convert_from_float_ext<at::BFloat16>(const Vecto
37
#define CVT_FP16_TO_FP32(a) \
38
_mm512_cvtps_ph(a, (_MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC))
39
40
-// this doesn't hanel NaN.
40
+// this doesn't handle NaN.
41
inline __m512bh cvt_e4m3_bf16_intrinsic_no_nan(__m256i fp8_vec) {
42
const __m512i x = _mm512_cvtepu8_epi16(fp8_vec);
43
docker/Dockerfile
+1
-1
@@ -63,7 +63,7 @@ ARG PYTORCH_CUDA_NIGHTLY_INDEX_BASE_URL=https://download.pytorch.org/whl/nightly
63
ARG PIP_KEYRING_PROVIDER=disabled
64
ARG UV_KEYRING_PROVIDER=${PIP_KEYRING_PROVIDER}
65
66
-# Flag enables build-in KV-connector dependency libs into docker images
66
+# Flag enables built-in KV-connector dependency libs into docker images
67
ARG INSTALL_KV_CONNECTORS=false
68
69
#################### BASE BUILD IMAGE ####################
docs/usage/v1_guide.md
+1
-1
@@ -106,7 +106,7 @@ to enable simultaneous generation and embedding using the same engine instance i
106
107
Models using selective state-space mechanisms instead of standard transformer attention are partially supported.
108
Models that use Mamba-2 layers (e.g., `Mamba2ForCausalLM`) are supported, but models that use older Mamba-1 layers
109
-(e.g., `MambaForCausalLM`, `JambaForCausalLM`) are not yet suported. Please note that these models currently require
109
+(e.g., `MambaForCausalLM`, `JambaForCausalLM`) are not yet supported. Please note that these models currently require
110
enforcing eager mode and disabling prefix caching in V1.
111
112
Models that combine Mamba-2 layers with standard attention layers are also supported (e.g., `BambaForCausalLM`,
pyproject.toml
+183
@@ -174,3 +174,186 @@ respect-ignore-files = true
174
175
[tool.ty.environment]
176
python = "./.venv"
177
+
178
+[tool.typos.files]
179
+# these files may be written in non english words
180
+extend-exclude = ["tests/models/fixtures/*", "tests/prompts/*",
181
+ "benchmarks/sonnet.txt", "tests/lora/data/*", "build/*",
182
+ "vllm/third_party/*"]
183
+ignore-hidden = true
184
+ignore-files = true
185
+ignore-dot = true
186
+ignore-vcs = true
187
+ignore-global = true
188
+ignore-parent = true
189
+
190
+[tool.typos.default]
191
+binary = false
192
+check-filename = false
193
+check-file = true
194
+unicode = true
195
+ignore-hex = true
196
+identifier-leading-digits = false
197
+locale = "en"
198
+extend-ignore-identifiers-re = ["NVML_*", ".*Unc.*", ".*_thw",
199
+ ".*UE8M0.*", ".*[UE4M3|ue4m3].*", ".*eles.*",
200
+ ".*[Tt]h[rR].*"]
201
+extend-ignore-words-re = []
202
+extend-ignore-re = []
203
+
204
+[tool.typos.default.extend-identifiers]
205
+bbc5b7ede = "bbc5b7ede"
206
+womens_doubles = "womens_doubles"
207
+v_2nd = "v_2nd"
208
+# splitted_input = "splitted_input"
209
+NOOPs = "NOOPs"
210
+typ = "typ"
211
+nin_shortcut = "nin_shortcut"
212
+UperNetDecoder = "UperNetDecoder"
213
+subtile = "subtile"
214
+cudaDevAttrMaxSharedMemoryPerBlockOptin = "cudaDevAttrMaxSharedMemoryPerBlockOptin"
215
+SFOuput = "SFOuput"
216
+# huggingface transformers repo uses these words
217
+depthwise_seperable_out_channel = "depthwise_seperable_out_channel"
218
+DepthWiseSeperableConv1d = "DepthWiseSeperableConv1d"
219
+depthwise_seperable_CNN = "depthwise_seperable_CNN"
220
+
221
+[tool.typos.default.extend-words]
222
+iy = "iy"
223
+tendencias = "tendencias"
224
+# intel cpu features
225
+tme = "tme"
226
+dout = "dout"
227
+Pn = "Pn"
228
+arange = "arange"
229
+
230
+[tool.typos.type.py]
231
+extend-glob = []
232
+extend-ignore-identifiers-re = []
233
+extend-ignore-words-re = []
234
+extend-ignore-re = []
235
+
236
+[tool.typos.type.py.extend-identifiers]
237
+arange = "arange"
238
+NDArray = "NDArray"
239
+EOFError = "EOFError"
240
+fo = "fo"
241
+ba = "ba"
242
+
243
+[tool.typos.type.py.extend-words]
244
+
245
+[tool.typos.type.cpp]
246
+extend-glob = ["*.cu"]
247
+extend-ignore-identifiers-re = []
248
+extend-ignore-words-re = []
249
+extend-ignore-re = []
250
+
251
+[tool.typos.type.cpp.extend-identifiers]
252
+countr_one = "countr_one"
253
+k_ot = "k_ot"
254
+ot = "ot"
255
+
256
+[tool.typos.type.cpp.extend-words]
257
+
258
+[tool.typos.type.rust]
259
+extend-glob = []
260
+extend-ignore-identifiers-re = []
261
+extend-ignore-words-re = []
262
+extend-ignore-re = []
263
+
264
+[tool.typos.type.rust.extend-identifiers]
265
+flate2 = "flate2"
266
+
267
+[tool.typos.type.rust.extend-words]
268
+ser = "ser"
269
+
270
+[tool.typos.type.lock]
271
+extend-glob = []
272
+check-file = false
273
+extend-ignore-identifiers-re = []
274
+extend-ignore-words-re = []
275
+extend-ignore-re = []
276
+
277
+[tool.typos.type.lock.extend-identifiers]
278
+
279
+[tool.typos.type.lock.extend-words]
280
+
281
+[tool.typos.type.jl]
282
+extend-glob = []
283
+extend-ignore-identifiers-re = []
284
+extend-ignore-words-re = []
285
+extend-ignore-re = []
286
+
287
+[tool.typos.type.jl.extend-identifiers]
288
+
289
+[tool.typos.type.jl.extend-words]
290
+modul = "modul"
291
+egals = "egals"
292
+usig = "usig"
293
+egal = "egal"
294
+
295
+[tool.typos.type.go]
296
+extend-glob = []
297
+extend-ignore-identifiers-re = []
298
+extend-ignore-words-re = []
299
+extend-ignore-re = []
300
+
301
+[tool.typos.type.go.extend-identifiers]
302
+flate = "flate"
303
+
304
+[tool.typos.type.go.extend-words]
305
+
306
+[tool.typos.type.css]
307
+extend-glob = []
308
+extend-ignore-identifiers-re = []
309
+extend-ignore-words-re = []
310
+extend-ignore-re = []
311
+
312
+[tool.typos.type.css.extend-identifiers]
313
+nd = "nd"
314
+
315
+[tool.typos.type.css.extend-words]
316
+
317
+[tool.typos.type.man]
318
+extend-glob = []
319
+extend-ignore-identifiers-re = []
320
+extend-ignore-words-re = []
321
+extend-ignore-re = []
322
+
323
+[tool.typos.type.man.extend-identifiers]
324
+Nd = "Nd"
325
+
326
+[tool.typos.type.man.extend-words]
327
+
328
+[tool.typos.type.cert]
329
+extend-glob = []
330
+check-file = false
331
+extend-ignore-identifiers-re = []
332
+extend-ignore-words-re = []
333
+extend-ignore-re = []
334
+
335
+[tool.typos.type.cert.extend-identifiers]
336
+
337
+[tool.typos.type.cert.extend-words]
338
+
339
+[tool.typos.type.sh]
340
+extend-glob = []
341
+extend-ignore-identifiers-re = []
342
+extend-ignore-words-re = []
343
+extend-ignore-re = []
344
+
345
+[tool.typos.type.sh.extend-identifiers]
346
+ot = "ot"
347
+
348
+[tool.typos.type.sh.extend-words]
349
+
350
+[tool.typos.type.vimscript]
351
+extend-glob = []
352
+extend-ignore-identifiers-re = []
353
+extend-ignore-words-re = []
354
+extend-ignore-re = []
355
+
356
+[tool.typos.type.vimscript.extend-identifiers]
357
+windo = "windo"
358
+
359
+[tool.typos.type.vimscript.extend-words]
tests/kernels/moe/modular_kernel_tools/common.py
+1
-1
@@ -416,7 +416,7 @@ class RankTensors:
416
# We dequant and use that as hidden_states so the tests are stable.
417
# quantizing and dequantizing yield slightly different results
418
# depending on the hardware. Here we, quantize and dequantize
419
- # first - so further quantize and dequantize will yeild the same
419
+ # first - so further quantize and dequantize will yield the same
420
# values.
421
if config.is_per_tensor_act_quant:
422
a_q, a_scales = ops.scaled_fp8_quant(
tests/kernels/moe/test_deepgemm.py
+1
-1
@@ -95,7 +95,7 @@ def run_single_case(m, n, k, topk, num_experts, block_size):
95
topk_weights, topk_ids = torch.topk(router_logits, k=topk, dim=-1)
96
topk_weights = torch.nn.functional.softmax(topk_weights, dim=-1)
97
98
- # triton referrence
98
+ # triton reference
99
out_triton = fused_experts(
100
hidden_states=tokens_bf16,
101
w1=w1,
tests/models/test_initialization.py
+1
-1
@@ -43,7 +43,7 @@ def test_can_initialize(model_arch: str, monkeypatch: pytest.MonkeyPatch):
43
text_config = hf_config.get_text_config()
44
45
# Ensure at least 2 expert per group
46
- # Since `grouped_topk` assums top-2
46
+ # Since `grouped_topk` assumes top-2
47
n_group = getattr(text_config, 'n_group', None)
48
num_experts = n_group * 2 if n_group is not None else 2
49
tests/v1/test_external_lb_dp.py
+1
-1
@@ -17,7 +17,7 @@ MODEL_NAME = "ibm-research/PowerMoE-3b"
17
18
# Number of data parallel ranks for external LB testing
19
DP_SIZE = int(os.getenv("DP_SIZE", "2"))
20
-# Default tensor parallell size to use
20
+# Default tensor parallel size to use
21
TP_SIZE = int(os.getenv("TP_SIZE", "1"))
22
23
typos.toml
deleted
-179
@@ -1,179 +0,0 @@
1
-[files]
2
-# these files may be written in non english words
3
-extend-exclude = ["tests/models/fixtures/*", "tests/prompts/*",
4
- "benchmarks/sonnet.txt", "tests/lora/data/*", "build/*",
5
- "vllm/third_party/*"]
6
-ignore-hidden = true
7
-ignore-files = true
8
-ignore-dot = true
9
-ignore-vcs = true
10
-ignore-global = true
11
-ignore-parent = true
12
-
13
-[default]
14
-binary = false
15
-check-filename = false
16
-check-file = true
17
-unicode = true
18
-ignore-hex = true
19
-identifier-leading-digits = false
20
-locale = "en"
21
-extend-ignore-identifiers-re = ["NVML_*", ".*Unc.*", ".*_thw",
22
- ".*UE8M0.*", ".*[UE4M3|ue4m3].*", ".*eles.*", ".*fo.*", ".*ba.*",
23
- ".*ot.*", ".*[Tt]h[rR].*"]
24
-extend-ignore-words-re = []
25
-extend-ignore-re = []
26
-
27
-[default.extend-identifiers]
28
-bbc5b7ede = "bbc5b7ede"
29
-womens_doubles = "womens_doubles"
30
-v_2nd = "v_2nd"
31
-splitted_input = "splitted_input"
32
-NOOPs = "NOOPs"
33
-typ = "typ"
34
-nin_shortcut = "nin_shortcut"
35
-UperNetDecoder = "UperNetDecoder"
36
-subtile = "subtile"
37
-cudaDevAttrMaxSharedMemoryPerBlockOptin = "cudaDevAttrMaxSharedMemoryPerBlockOptin"
38
-SFOuput = "SFOuput"
39
-# huggingface transformers repo uses these words
40
-depthwise_seperable_out_channel = "depthwise_seperable_out_channel"
41
-DepthWiseSeperableConv1d = "DepthWiseSeperableConv1d"
42
-depthwise_seperable_CNN = "depthwise_seperable_CNN"
43
-
44
-[default.extend-words]
45
-iy = "iy"
46
-tendencias = "tendencias"
47
-# intel cpu features
48
-tme = "tme"
49
-dout = "dout"
50
-Pn = "Pn"
51
-arange = "arange"
52
-
53
-[type.py]
54
-extend-glob = []
55
-extend-ignore-identifiers-re = []
56
-extend-ignore-words-re = []
57
-extend-ignore-re = []
58
-
59
-[type.py.extend-identifiers]
60
-arange = "arange"
61
-NDArray = "NDArray"
62
-EOFError = "EOFError"
63
-
64
-[type.py.extend-words]
65
-
66
-[type.cpp]
67
-extend-glob = []
68
-extend-ignore-identifiers-re = []
69
-extend-ignore-words-re = []
70
-extend-ignore-re = []
71
-
72
-[type.cpp.extend-identifiers]
73
-countr_one = "countr_one"
74
-
75
-[type.cpp.extend-words]
76
-
77
-[type.rust]
78
-extend-glob = []
79
-extend-ignore-identifiers-re = []
80
-extend-ignore-words-re = []
81
-extend-ignore-re = []
82
-
83
-[type.rust.extend-identifiers]
84
-flate2 = "flate2"
85
-
86
-[type.rust.extend-words]
87
-ser = "ser"
88
-
89
-[type.lock]
90
-extend-glob = []
91
-check-file = false
92
-extend-ignore-identifiers-re = []
93
-extend-ignore-words-re = []
94
-extend-ignore-re = []
95
-
96
-[type.lock.extend-identifiers]
97
-
98
-[type.lock.extend-words]
99
-
100
-[type.jl]
101
-extend-glob = []
102
-extend-ignore-identifiers-re = []
103
-extend-ignore-words-re = []
104
-extend-ignore-re = []
105
-
106
-[type.jl.extend-identifiers]
107
-
108
-[type.jl.extend-words]
109
-modul = "modul"
110
-egals = "egals"
111
-usig = "usig"
112
-egal = "egal"
113
-
114
-[type.go]
115
-extend-glob = []
116
-extend-ignore-identifiers-re = []
117
-extend-ignore-words-re = []
118
-extend-ignore-re = []
119
-
120
-[type.go.extend-identifiers]
121
-flate = "flate"
122
-
123
-[type.go.extend-words]
124
-
125
-[type.css]
126
-extend-glob = []
127
-extend-ignore-identifiers-re = []
128
-extend-ignore-words-re = []
129
-extend-ignore-re = []
130
-
131
-[type.css.extend-identifiers]
132
-nd = "nd"
133
-
134
-[type.css.extend-words]
135
-
136
-[type.man]
137
-extend-glob = []
138
-extend-ignore-identifiers-re = []
139
-extend-ignore-words-re = []
140
-extend-ignore-re = []
141
-
142
-[type.man.extend-identifiers]
143
-Nd = "Nd"
144
-
145
-[type.man.extend-words]
146
-
147
-[type.cert]
148
-extend-glob = []
149
-check-file = false
150
-extend-ignore-identifiers-re = []
151
-extend-ignore-words-re = []
152
-extend-ignore-re = []
153
-
154
-[type.cert.extend-identifiers]
155
-
156
-[type.cert.extend-words]
157
-
158
-[type.sh]
159
-extend-glob = []
160
-extend-ignore-identifiers-re = []
161
-extend-ignore-words-re = []
162
-extend-ignore-re = []
163
-
164
-[type.sh.extend-identifiers]
165
-stap = "stap"
166
-ot = "ot"
167
-
168
-[type.sh.extend-words]
169
-
170
-[type.vimscript]
171
-extend-glob = []
172
-extend-ignore-identifiers-re = []
173
-extend-ignore-words-re = []
174
-extend-ignore-re = []
175
-
176
-[type.vimscript.extend-identifiers]
177
-windo = "windo"
178
-
179
-[type.vimscript.extend-words]
vllm/attention/backends/differential_flash_attn.py
+1
-1
@@ -961,7 +961,7 @@ class DifferentialFlashAttentionImpl(AttentionImpl):
961
"... H (two D) -> ... (H two) D",
962
two=2)
963
964
- else: # re-use the kv cache, full attention
964
+ else: # reuse the kv cache, full attention
965
q = q.view(-1, self.num_heads, self.head_size)
966
q1, q2 = self.split_heads(q)
967
# kv_cache shape is (2, num_blocks, block_size, num_kv_heads, head_size) # noqa: E501
vllm/entrypoints/openai/serving_responses.py
+1
-1
@@ -372,7 +372,7 @@ class OpenAIServingResponses(OpenAIServing):
372
})
373
374
# Append the new input.
375
- # Reponses API supports simple text inputs without chat format.
375
+ # Responses API supports simple text inputs without chat format.
376
if isinstance(request.input, str):
377
messages.append({"role": "user", "content": request.input})
378
else:
vllm/model_executor/layers/fused_moe/fused_moe.py
+1
-1
@@ -1172,7 +1172,7 @@ def fused_experts(
1172
allow_cutlass_block_scaled_grouped_gemm: bool = False) -> torch.Tensor:
1173
# For now, disable DeepGemm for small N (<= 512) until better
1174
# permute/unpermute ops are available.
1175
- # However, on B200, we use DeepGemm for all cases becuase they only support
1175
+ # However, on B200, we use DeepGemm for all cases because they only support
1176
# E8M0 scale, which means we requantize the weight and input to the specific
1177
# scale. Fallen back to cutlass or triton for some cases would cause
1178
# accuracy issue.
vllm/model_executor/models/phi4flash.py
+1
-1
@@ -193,7 +193,7 @@ class SambaYAttention(nn.Module):
193
],
194
dim=-1)
195
attn_output = self.attn(q, k, v)
196
- else: # re-use the kv cache, full attention
196
+ else: # reuse the kv cache, full attention
197
q = self.Wqkv(hidden_states)
198
attn_output = self.attn(q, None, None)
199
attn_output = attn_output.view(-1, self.num_heads * self.head_dim)
vllm/v1/attention/backends/mla/common.py
+1
-1
@@ -394,7 +394,7 @@ def use_cudnn_prefill() -> bool:
394
395
396
# Currently 394MB, this can be tuned based on GEMM sizes used.
397
-# Choosen to be the same as sglang:
397
+# Chosen to be the same as sglang:
398
# https://github.com/sgl-project/sglang/blob/766392c6bda2558b61ce6d1c1bfd8081a549e1f1/python/sglang/global_config.py#L37
399
FLASHINFER_WORKSPACE_BUFFER_SIZE = 394 * 1024 * 1024
400
vllm/v1/worker/tpu_model_runner.py
+1
-1
@@ -969,7 +969,7 @@ class TPUModelRunner(LoRAModelRunnerMixin):
969
else:
970
mm_embeds = []
971
xm.mark_step()
972
- # Prepare inputs, the requests might be splitted into multiple
972
+ # Prepare inputs, the requests might be split into multiple
973
# executions, combine the result of each execution.
974
start_index = 0
975
combined_selected_tokens: list[torch.Tensor] = []