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 7, 05:15 UTC
[Bugfix][CI] fix typos (#34934)
Signed-off-by: 1195343015 <1195343015@qq.com> Signed-off-by: Jiayi Yan <66017932+1195343015@users.noreply.github.com> Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Jiayi Yan committed
Mar 6, 2026 at 01:05 UTC
6a895197fafa7069be75ff615709b77546bcec30
98 files changed
+227
-366
.buildkite/scripts/upload-nightly-wheels.sh
+1
-1
@@ -72,7 +72,7 @@ obj_json="objects.json"
72
aws s3api list-objects-v2 --bucket "$BUCKET" --prefix "$SUBPATH/" --delimiter / --output json > "$obj_json"
73
mkdir -p "$INDICES_OUTPUT_DIR"
74
75
-# call script to generate indicies for all existing wheels
75
+# call script to generate indices for all existing wheels
76
# this indices have relative paths that could work as long as it is next to the wheel directory in s3
77
# i.e., the wheels are always in s3://vllm-wheels/<commit>/
78
# and indices can be placed in /<commit>/, or /nightly/, or /<version>/
.buildkite/test-amd.yaml
+2
-2
@@ -467,7 +467,7 @@ steps:
467
- pip install -U git+https://github.com/robertgshaw2-redhat/lm-evaluation-harness.git@streaming-api
468
- pytest -v -s entrypoints/openai/correctness/test_lmeval.py::test_lm_eval_accuracy_v1_engine
469
470
-# TODO: Add the "V1 Test attetion (MI300)" test group
470
+# TODO: Add the "V1 Test attention (MI300)" test group
471
472
- label: V1 Test attention (H100) # 10min
473
mirror_hardwares: [amdexperimental, amdproduction]
@@ -2174,7 +2174,7 @@ steps:
2174
- pip install -U git+https://github.com/robertgshaw2-redhat/lm-evaluation-harness.git@streaming-api
2175
- pytest -v -s entrypoints/openai/correctness/test_lmeval.py::test_lm_eval_accuracy_v1_engine
2176
2177
-# TODO: Add the "V1 Test attetion (MI300)" test group
2177
+# TODO: Add the "V1 Test attention (MI300)" test group
2178
2179
- label: V1 Test attention (H100) # 10min
2180
mirror_hardwares: [amdexperimental]
.pre-commit-config.yaml
+1
-1
@@ -13,7 +13,7 @@ repos:
13
args: [--output-format, github, --fix]
14
- id: ruff-format
15
- repo: https://github.com/crate-ci/typos
16
- rev: v1.38.1
16
+ rev: v1.43.5
17
hooks:
18
- id: typos
19
args: [--force-exclude]
benchmarks/attention_benchmarks/common.py
+1
-1
@@ -30,7 +30,7 @@ def batch_spec_sort_key(spec: str) -> tuple[int, int, int]:
30
max_kv_len = max(r.kv_len for r in requests) if requests else 0
31
return (batch_size, max_q_len, max_kv_len)
32
except Exception:
33
- # Fallback for unparseable specs
33
+ # Fallback for unparsable specs
34
return (0, 0, 0)
35
36
benchmarks/kernels/benchmark_2d_silu_mul_fp8_quant.py
+1
-1
@@ -202,7 +202,7 @@ def test_correctness(T: int, N: int):
202
# reference output
203
ref_out_q, ref_out_s = output_from_impl(ImplType.REFERENCE)
204
205
- # test ouptut
205
+ # test output
206
out_q, out_s = output_from_impl(
207
ImplType.SILU_MUL_PER_TOKEN_GROUP_QUANT_FP8_COLMAJOR
208
)
csrc/cpu/cpu_attn_amx.hpp
+1
-1
@@ -420,7 +420,7 @@ class AttentionImpl<ISA::AMX, scalar_t, head_dim> {
420
const int64_t block_size, const int64_t block_size_stride) {
421
// For AMX 2D tiles, size of each line is 64 bytes
422
constexpr int64_t amx_tile_row_size = AMX_TILE_ROW_BYTES;
423
- // For AMX B martix, N always is 16
423
+ // For AMX B matrix, N always is 16
424
constexpr int64_t amx_b_tile_n_size = AMX_TILE_ROW_BYTES / 4;
425
constexpr int64_t amx_b_tile_k_size = amx_tile_row_size / sizeof(scalar_t);
426
// For now suppose block_size is divisible by amx_tile_column_num
csrc/cpu/torch_bindings.cpp
+1
-1
@@ -4,7 +4,7 @@
4
5
#include <torch/library.h>
6
7
-// Note: overwrite the external defination for sharing same name between
7
+// Note: overwrite the external definition for sharing same name between
8
// libraries use different ISAs.
9
#define TORCH_EXTENSION_NAME _C
10
csrc/moe/moe_align_sum_kernels.cu
+2
-2
@@ -35,11 +35,11 @@ __global__ void batched_moe_align_block_size_kernel(
35
int32_t const block_ids_size = sorted_ids_size / block_size;
36
int32_t const SENTINEL =
37
num_batches * max_tokens_per_batch; // To denote invalid entries.
38
- // Intialize sorted_ids
38
+ // Initialize sorted_ids
39
for (size_t i = threadIdx.x; i < sorted_ids_size; i += stride) {
40
sorted_ids[i] = SENTINEL;
41
}
42
- // Intialize expert_ids with -1
42
+ // Initialize expert_ids with -1
43
for (size_t i = threadIdx.x; i < block_ids_size; i += stride) {
44
block_ids[i] = -1;
45
}
csrc/quantization/activation_kernels.cu
+1
-1
@@ -542,7 +542,7 @@ __global__ void silu_mul_fp8_quant_deep_gemm_kernel(
542
if (!lane_id) {
543
// Store scales.
544
if constexpr (std::is_same<scale_t, uint8_t>::value) {
545
- // Packed UE8MO format. Remove Mantissa.
545
+ // Packed UE8M0 format. Remove Mantissa.
546
*y_s_ptr = reinterpret_cast<int16_t&>(y_s) >> 7;
547
548
bool const jump_pack = (current_group_id + 1) % 4 == 0;
csrc/rocm/skinny_gemms.cu
+1
-1
@@ -1476,7 +1476,7 @@ __global__ void __launch_bounds__(WvPrGrp* THRDS)
1476
#endif
1477
1478
// B[] staging is cooperative across GrpsShrB, so sync here before reading
1479
- // back. This wait is currently inserted by compiler, but not gauranteed.
1479
+ // back. This wait is currently inserted by compiler, but not guaranteed.
1480
asm volatile("s_waitcnt 0");
1481
__syncthreads();
1482
docs/design/cuda_graphs.md
+1
-1
@@ -98,7 +98,7 @@ The goal of this structure is to uniquely identify a (padded) batch with minimal
98
99
### `CudagraphDispatcher`
100
101
-The [CudagraphDispatcher][vllm.v1.cudagraph_dispatcher.CudagraphDispatcher] takes responsibility for maintaining two sets of valid dispatching keys, one set for `FULL` runtime mode and one set for `PIECEWISE` runtime mode, and dispatches the correct runtime mode and the dispatching keys before executing the model's forwards. It will take in the initial key (a rough batch_descriptor for the padded input) and return the selected runtime mode and the final batch_descriptor, then tell the CUDAGraphWarpper instances that decision through forward contexts. Notice that `CudagraphDispatcher` is the only source of truth for available CUDA Graph keys and `CUDAGraphWrapper` instances can blindly trust the forward context on what CUDA Graphs to dispatch to. This lets us simplify the wrapper code and centralize the logic in the dispatcher.
101
+The [CudagraphDispatcher][vllm.v1.cudagraph_dispatcher.CudagraphDispatcher] takes responsibility for maintaining two sets of valid dispatching keys, one set for `FULL` runtime mode and one set for `PIECEWISE` runtime mode, and dispatches the correct runtime mode and the dispatching keys before executing the model's forwards. It will take in the initial key (a rough batch_descriptor for the padded input) and return the selected runtime mode and the final batch_descriptor, then tell the CUDAGraphWrapper instances that decision through forward contexts. Notice that `CudagraphDispatcher` is the only source of truth for available CUDA Graph keys and `CUDAGraphWrapper` instances can blindly trust the forward context on what CUDA Graphs to dispatch to. This lets us simplify the wrapper code and centralize the logic in the dispatcher.
102
103
The dispatching keys are initialized through the dispatcher's `initialize_cudagraph_keys` method, which is called by the gpu_model_runner after all possible attention backends are initialized. This is where we can get much fancier in the future and “prepare” all kinds of CUDA Graphs combinations. For now, we just append available keys based on the valid combos of `decode_mode`/`mixed_mode` of `cudagraph_mode` and `cudagraph_capture_sizes` in the compilation config.
104
docs/design/fused_moe_modular_kernel.md
+1
-1
@@ -47,7 +47,7 @@ The TopK Weight Application and Reduction components happen right after the Unpe
47
Please find the implementations of TopKWeightAndReduce [here](../../vllm/model_executor/layers/fused_moe/topk_weight_and_reduce.py).
48
49
`FusedMoEPrepareAndFinalizeModular::finalize()` method accepts a `TopKWeightAndReduce` argument that is invoked inside the method.
50
-The `FusedMoEModularKernel` acts as a bridge between the `FusedMoEExpertsModular` and `FusedMoEPerpareAndFinalize` implementations to determine where the TopK Weight Application and Reduction happens.
50
+The `FusedMoEModularKernel` acts as a bridge between the `FusedMoEExpertsModular` and `FusedMoEPrepareAndFinalize` implementations to determine where the TopK Weight Application and Reduction happens.
51
52
* `FusedMoEExpertsModular::finalize_weight_and_reduce_impl` method returns `TopKWeightAndReduceNoOp` if the `FusedMoEExpertsModular` implementation does the weight application and reduction itself.
53
* `FusedMoEExpertsModular::finalize_weight_and_reduce_impl` method returns `TopKWeightAndReduceContiguous` / `TopKWeightAndReduceNaiveBatched` / `TopKWeightAndReduceDelegate` if the `FusedMoEExpertsModular` implementation needs the `FusedMoEPrepareAndFinalizeModular::finalize()` to do the weight application and reduction.
docs/design/logits_processors.md
+1
-1
@@ -352,7 +352,7 @@ The `BatchUpdate` abstraction models the persistent batch as a list of requests,
352
(s, d, UNIDIRECTIONAL or SWAP)
353
```
354
355
- * If the Move specifies `UNIDRECTIONAL`:
355
+ * If the Move specifies `UNIDIRECTIONAL`:
356
357
* The request at index `s` is moved to index `d`; index `s` becomes an empty slot
358
docs/design/plugin_system.md
+1
-1
@@ -141,7 +141,7 @@ Every plugin has three parts:
141
- triton ops
142
Custom way doesn't work for triton ops now.
143
144
-7. (optional) Implement other plugable modules, such as lora, graph backend, quantization, mamba attention backend, etc.
144
+7. (optional) Implement other pluggable modules, such as lora, graph backend, quantization, mamba attention backend, etc.
145
146
## Compatibility Guarantee
147
docs/models/pooling_models.md
+2
-2
@@ -641,7 +641,7 @@ Then you obtain the sparse embeddings like this:
641
curl -s http://localhost:8000/pooling -H "Content-Type: application/json" -d '{
642
"model": "BAAI/bge-m3",
643
"task": "token_classify",
644
- "input": ["What is BGE M3?", "Defination of BM25"]
644
+ "input": ["What is BGE M3?", "Definition of BM25"]
645
}'
646
```
647
@@ -657,7 +657,7 @@ You can obtain the colbert embeddings like this:
657
curl -s http://localhost:8000/pooling -H "Content-Type: application/json" -d '{
658
"model": "BAAI/bge-m3",
659
"task": "token_embed",
660
- "input": ["What is BGE M3?", "Defination of BM25"]
660
+ "input": ["What is BGE M3?", "Definition of BM25"]
661
}'
662
```
663
examples/online_serving/dashboards/grafana/query_statistics.json
+1
-1
@@ -349,7 +349,7 @@
349
"defaults": {
350
"color": { "mode": "thresholds" },
351
"mappings": [
352
- { "options": { "Calcultion": { "index": 0, "text": "Last (not null)" } }, "type": "value" }
352
+ { "options": { "Calculation": { "index": 0, "text": "Last (not null)" } }, "type": "value" }
353
],
354
"thresholds": {
355
"mode": "absolute",
pyproject.toml
+25
-164
@@ -124,193 +124,54 @@ python = "./.venv"
124
125
[tool.typos.files]
126
# these files may be written in non english words
127
-extend-exclude = ["tests/models/fixtures/*", "tests/prompts/*",
128
- "benchmarks/sonnet.txt", "tests/lora/data/*", "build/*",
129
- "vllm/third_party/*", "vllm/entrypoints/serve/instrumentator/static/*",
130
- "docs/governance/process.md"]
131
-ignore-hidden = true
132
-ignore-files = true
133
-ignore-dot = true
134
-ignore-vcs = true
135
-ignore-global = true
136
-ignore-parent = true
127
+extend-exclude = ["tests/models/fixtures/*", "tests/prompts/*", "tests/tokenizers_/*",
128
+ "benchmarks/sonnet.txt", "tests/lora/data/*", "examples/pooling/token_embed/*", "build/*",
129
+ "vllm/third_party/*", "vllm/entrypoints/serve/instrumentator/static/*", "tests/entrypoints/openai/test_transcription_validation.py",
130
+ "docs/governance/process.md", "tests/v1/engine/test_fast_incdec_prefix_err.py", ".git/*"]
131
+ignore-hidden = false
132
133
[tool.typos.default]
139
-binary = false
140
-check-filename = false
141
-check-file = true
142
-unicode = true
143
-ignore-hex = true
144
-identifier-leading-digits = false
145
-locale = "en"
146
-extend-ignore-identifiers-re = ["NVML_*", ".*Unc.*", ".*_thw",
147
- ".*UE8M0.*", ".*[UE4M3|ue4m3].*", ".*eles.*",
148
- ".*[Tt]h[rR].*"]
149
-extend-ignore-words-re = []
150
-extend-ignore-re = []
134
+extend-ignore-identifiers-re = [".*[Uu][Ee][0-9][Mm][0-9].*"]
135
136
[tool.typos.default.extend-identifiers]
137
bbc5b7ede = "bbc5b7ede"
154
-womens_doubles = "womens_doubles"
155
-v_2nd = "v_2nd"
156
-# splitted_input = "splitted_input"
138
NOOPs = "NOOPs"
158
-typ = "typ"
139
nin_shortcut = "nin_shortcut"
160
-UperNetDecoder = "UperNetDecoder"
161
-subtile = "subtile"
140
cudaDevAttrMaxSharedMemoryPerBlockOptin = "cudaDevAttrMaxSharedMemoryPerBlockOptin"
163
-SFOuput = "SFOuput"
164
-# huggingface transformers repo uses these words
141
+
142
depthwise_seperable_out_channel = "depthwise_seperable_out_channel"
166
-DepthWiseSeperableConv1d = "DepthWiseSeperableConv1d"
167
-depthwise_seperable_CNN = "depthwise_seperable_CNN"
143
+pard_token = "pard_token"
144
+ptd_token_id = "ptd_token_id"
145
+ser_de = "ser_de"
146
+shared_memory_per_block_optin = "shared_memory_per_block_optin"
147
+FoPE = "FoPE"
148
+k_ot = "k_ot"
149
+view_seperator = "view_seperator"
150
+inverse_std_variences = "inverse_std_variences"
151
152
[tool.typos.default.extend-words]
153
iy = "iy"
171
-tendencias = "tendencias"
154
indx = "indx"
155
# intel cpu features
156
tme = "tme"
157
dout = "dout"
158
Pn = "Pn"
159
arange = "arange"
160
+thw = "thw"
161
+subtile = "subtile"
162
+HSA = "HSA"
163
+setp = "setp"
164
+CPY = "CPY"
165
+thr = "thr"
166
+Thr = "Thr"
167
PARD = "PARD"
168
pard = "pard"
169
AKS = "AKS"
181
-
182
-[tool.typos.type.py]
183
-extend-glob = []
184
-extend-ignore-identifiers-re = []
185
-extend-ignore-words-re = []
186
-extend-ignore-re = []
187
-
188
-[tool.typos.type.py.extend-identifiers]
189
-arange = "arange"
190
-NDArray = "NDArray"
191
-EOFError = "EOFError"
192
-fo = "fo"
170
ba = "ba"
194
-
195
-[tool.typos.type.py.extend-words]
196
-ba = "ba"
197
-nd = "nd"
198
-
199
-[tool.typos.type.cpp]
200
-extend-glob = ["*.cu"]
201
-extend-ignore-identifiers-re = []
202
-extend-ignore-words-re = []
203
-extend-ignore-re = []
204
-
205
-[tool.typos.type.cpp.extend-identifiers]
206
-countr_one = "countr_one"
207
-k_ot = "k_ot"
208
-ot = "ot"
209
-
210
-[tool.typos.type.cpp.extend-words]
211
-
212
-[tool.typos.type.rust]
213
-extend-glob = []
214
-extend-ignore-identifiers-re = []
215
-extend-ignore-words-re = []
216
-extend-ignore-re = []
217
-
218
-[tool.typos.type.rust.extend-identifiers]
219
-flate2 = "flate2"
220
-
221
-[tool.typos.type.rust.extend-words]
222
-ser = "ser"
223
-
224
-[tool.typos.type.lock]
225
-extend-glob = []
226
-check-file = false
227
-extend-ignore-identifiers-re = []
228
-extend-ignore-words-re = []
229
-extend-ignore-re = []
230
-
231
-[tool.typos.type.lock.extend-identifiers]
232
-
233
-[tool.typos.type.lock.extend-words]
234
-
235
-[tool.typos.type.jl]
236
-extend-glob = []
237
-extend-ignore-identifiers-re = []
238
-extend-ignore-words-re = []
239
-extend-ignore-re = []
240
-
241
-[tool.typos.type.jl.extend-identifiers]
242
-
243
-[tool.typos.type.jl.extend-words]
244
-modul = "modul"
245
-egals = "egals"
246
-usig = "usig"
247
-egal = "egal"
248
-
249
-[tool.typos.type.go]
250
-extend-glob = []
251
-extend-ignore-identifiers-re = []
252
-extend-ignore-words-re = []
253
-extend-ignore-re = []
254
-
255
-[tool.typos.type.go.extend-identifiers]
256
-flate = "flate"
257
-
258
-[tool.typos.type.go.extend-words]
259
-
260
-[tool.typos.type.css]
261
-extend-glob = []
262
-extend-ignore-identifiers-re = []
263
-extend-ignore-words-re = []
264
-extend-ignore-re = []
265
-
266
-[tool.typos.type.css.extend-identifiers]
171
+fo = "fo"
172
nd = "nd"
268
-
269
-[tool.typos.type.css.extend-words]
270
-
271
-[tool.typos.type.man]
272
-extend-glob = []
273
-extend-ignore-identifiers-re = []
274
-extend-ignore-words-re = []
275
-extend-ignore-re = []
276
-
277
-[tool.typos.type.man.extend-identifiers]
278
-Nd = "Nd"
279
-
280
-[tool.typos.type.man.extend-words]
281
-
282
-[tool.typos.type.cert]
283
-extend-glob = []
284
-check-file = false
285
-extend-ignore-identifiers-re = []
286
-extend-ignore-words-re = []
287
-extend-ignore-re = []
288
-
289
-[tool.typos.type.cert.extend-identifiers]
290
-
291
-[tool.typos.type.cert.extend-words]
292
-
293
-[tool.typos.type.sh]
294
-extend-glob = []
295
-extend-ignore-identifiers-re = []
296
-extend-ignore-words-re = []
297
-extend-ignore-re = []
298
-
299
-[tool.typos.type.sh.extend-identifiers]
300
-ot = "ot"
301
-
302
-[tool.typos.type.sh.extend-words]
303
-
304
-[tool.typos.type.vimscript]
305
-extend-glob = []
306
-extend-ignore-identifiers-re = []
307
-extend-ignore-words-re = []
308
-extend-ignore-re = []
309
-
310
-[tool.typos.type.vimscript.extend-identifiers]
311
-windo = "windo"
312
-
313
-[tool.typos.type.vimscript.extend-words]
173
+eles = "eles"
174
+datas = "datas"
175
176
[tool.uv]
177
no-build-isolation-package = ["torch"]
tests/compile/test_decorator.py
+1
-1
@@ -234,7 +234,7 @@ def test_conditional_compile_enable_if(use_inductor_graph_partition, monkeypatch
234
expected_num_backend_compilations = 4
235
236
# A has support_torch_compile but enable_if fn returns False
237
- # enalbe_if will be True for B, so we expect mod1 and mod2
237
+ # enable_if will be True for B, so we expect mod1 and mod2
238
# to be compiled
239
with compilation_counter.expect(
240
num_graphs_seen=2,
tests/compile/test_wrapper.py
+1
-1
@@ -95,7 +95,7 @@ def test_torch_compile_wrapper(use_bytecode_hook, monkeypatch):
95
f"Expected {expected1}, got {result1}"
96
)
97
98
- # Second call should triger another compilation
98
+ # Second call should trigger another compilation
99
x2 = torch.tensor([1, 2, 3])
100
result2 = wrapper(x2)
101
expected2 = torch.tensor([100, 200, 300])
tests/kernels/attention/test_attention.py
+1
-1
@@ -444,7 +444,7 @@ def ref_multi_query_kv_attention(
444
445
446
@pytest.mark.parametrize("attention_cls", [Attention, MMEncoderAttention])
447
-def test_num_heads_not_divisble_by_num_kv_heads(attention_cls: type) -> None:
447
+def test_num_heads_not_divisible_by_num_kv_heads(attention_cls: type) -> None:
448
head_size = 64
449
scale = float(1.0 / (head_size**0.5))
450
num_heads = 16
tests/kernels/moe/test_modular_kernel_combinations.py
+3
-3
@@ -162,7 +162,7 @@ Ns = [1024]
162
TOPKs = [4, 1]
163
Es = [32]
164
DTYPEs = [torch.bfloat16]
165
-FUSED_MOE_CHUNK_SIZEs = [None, 16]
165
+FUSED_MOE_CHUNK_SIZES = [None, 16]
166
167
168
def is_nyi_config(config: Config) -> bool:
@@ -192,7 +192,7 @@ def generate_valid_test_cases(
192
DTYPEs,
193
MK_QUANT_CONFIGS,
194
product(prepare_finalize_types, MK_FUSED_EXPERT_TYPES),
195
- FUSED_MOE_CHUNK_SIZEs,
195
+ FUSED_MOE_CHUNK_SIZES,
196
):
197
total = total + 1
198
@@ -266,7 +266,7 @@ def test_modular_kernel_combinations_multigpu(
266
if cuda_device_count_stateless() < world_size:
267
pytest.skip(
268
f"Not enough GPUs available to run, got "
269
- f"{cuda_device_count_stateless()} exepected "
269
+ f"{cuda_device_count_stateless()} expected "
270
f"{world_size}."
271
)
272
tests/models/language/generation/test_mistral.py
+2
-2
@@ -87,7 +87,7 @@ MSGS = [
87
{
88
"role": "user",
89
"content": "Could you please rewrite the below article? \n\n My English needs "
90
- "improvving, maybe I make errors.",
90
+ "improving, maybe I make errors.",
91
},
92
{
93
"role": "assistant",
@@ -98,7 +98,7 @@ MSGS = [
98
"type": "function",
99
"function": {
100
"name": "rewrite",
101
- "arguments": '{"text":"My English needs improvving, maybe '
101
+ "arguments": '{"text":"My English needs improving, maybe '
102
'I make errors."}',
103
},
104
}
tests/models/language/pooling/test_bge_m3.py
+1
-1
@@ -14,7 +14,7 @@ MAX_MODEL_LEN = 512
14
15
16
# Example from https://huggingface.co/BAAI/bge-m3
17
-sentences_1 = ["What is BGE M3?", "Defination of BM25"]
17
+sentences_1 = ["What is BGE M3?", "Definition of BM25"]
18
sentences_2 = [
19
"BGE M3 is an embedding model supporting dense retrieval, "
20
"lexical matching and multi-vector interaction.",
tests/models/multimodal/generation/vlm_utils/model_utils.py
+2
-2
@@ -719,7 +719,7 @@ def isaac_patch_hf_runner(hf_model: HfRunner) -> HfRunner:
719
# Convert to tuple or None
720
all_hidden_states = tuple(hidden_states_list) if output_hidden_states else None
721
722
- # Include hiden_states for compatibility with hidden_states_to_seq_logprobs()
722
+ # Include hidden_states for compatibility with hidden_states_to_seq_logprobs()
723
return BaseModelOutputWithPast(
724
last_hidden_state=hidden_states,
725
past_key_values=past_key_values,
@@ -1226,7 +1226,7 @@ def voxtral_patch_hf_runner(hf_model: "HfRunner") -> "HfRunner":
1226
dicts (accepting ``url``, ``path``, or ``base64`` audio) rather than
1227
the standard ``processor(text=, audio=, sampling_rate=)`` interface.
1228
2. HfRunner.get_inputs cannot handle multi-audio per prompt because it
1229
- mis-unpacks ``[(arr1, sr1), (arr2, sr2)]`` via a ``len == 2`` check.
1229
+ incorrectly unpacks ``[(arr1, sr1), (arr2, sr2)]`` via a ``len == 2`` check.
1230
1231
We override ``get_inputs`` to build conversation dicts and call
1232
``apply_chat_template`` directly, bypassing both issues. We also wrap
tests/quantization/test_blackwell_moe.py
+1
-1
@@ -25,7 +25,7 @@ def set_test_environment():
25
os.environ["FLASHINFER_NVCC_THREADS"] = "16"
26
27
28
-# Overide the backbone layers to 4 for faster startup
28
+# Override the backbone layers to 4 for faster startup
29
HF_OVERRIDE_TEXT = {
30
"num_layers": 4,
31
"num_hidden_layers": 4,
tests/renderers/test_hf.py
+2
-2
@@ -206,8 +206,8 @@ def test_resolve_chat_template_kwargs(sample_json_schema, model, expected_kwargs
206
207
chat_template_kwargs = {
208
# both unused
209
- "unsed_kwargs_1": 123,
210
- "unsed_kwargs_2": "abc",
209
+ "unused_kwargs_1": 123,
210
+ "unused_kwargs_2": "abc",
211
# should not appear
212
"chat_template": "{% Hello world! %}",
213
"tokenize": True,
tests/test_config.py
+4
-4
@@ -853,7 +853,7 @@ def test_vllm_config_defaults_are_none():
853
854
855
@pytest.mark.parametrize(
856
- ("model_id", "compiliation_config", "optimization_level"),
856
+ ("model_id", "compilation_config", "optimization_level"),
857
[
858
(
859
None,
@@ -895,7 +895,7 @@ def test_vllm_config_defaults_are_none():
895
("RedHatAI/DeepSeek-V2.5-1210-FP8", CompilationConfig(), OptimizationLevel.O3),
896
],
897
)
898
-def test_vllm_config_defaults(model_id, compiliation_config, optimization_level):
898
+def test_vllm_config_defaults(model_id, compilation_config, optimization_level):
899
"""Test that optimization-level defaults are correctly applied."""
900
901
model_config = None
@@ -903,12 +903,12 @@ def test_vllm_config_defaults(model_id, compiliation_config, optimization_level)
903
model_config = ModelConfig(model_id)
904
vllm_config = VllmConfig(
905
model_config=model_config,
906
- compilation_config=compiliation_config,
906
+ compilation_config=compilation_config,
907
optimization_level=optimization_level,
908
)
909
else:
910
vllm_config = VllmConfig(
911
- compilation_config=compiliation_config,
911
+ compilation_config=compilation_config,
912
optimization_level=optimization_level,
913
)
914
# Use the global optimization level defaults
tests/tool_parsers/test_seed_oss_tool_parser.py
+2
-2
@@ -106,7 +106,7 @@ def test_extract_tool_calls_no_tools(seed_oss_tool_parser):
106
@pytest.mark.parametrize(
107
ids=[
108
"tool_call_0_thinking_budget",
109
- "tool_call_512_thinkg_budget",
109
+ "tool_call_512_thinking_budget",
110
"tool_call_unlimited_thinking_budget",
111
],
112
argnames=["model_output", "expected_tool_calls", "expected_content"],
@@ -308,7 +308,7 @@ def stream_delta_message_generator(
308
@pytest.mark.parametrize(
309
ids=[
310
"tool_call_0_thinking_budget",
311
- "tool_call_512_thinkg_budget",
311
+ "tool_call_512_thinking_budget",
312
"tool_call_unlimited_thinking_budget",
313
],
314
argnames=["model_output", "expected_tool_calls", "expected_content"],
tests/transformers_utils/test_repo_utils.py
+4
-4
@@ -34,10 +34,10 @@ def test_list_filtered_repo_files(
34
subfolder.mkdir()
35
(path_tmp_dir / "json_file.json").touch()
36
(path_tmp_dir / "correct_2.txt").touch()
37
- (path_tmp_dir / "uncorrect.txt").touch()
38
- (path_tmp_dir / "uncorrect.jpeg").touch()
37
+ (path_tmp_dir / "incorrect.txt").touch()
38
+ (path_tmp_dir / "incorrect.jpeg").touch()
39
(subfolder / "correct.txt").touch()
40
- (subfolder / "uncorrect_sub.txt").touch()
40
+ (subfolder / "incorrect_sub.txt").touch()
41
42
def _glob_path() -> list[str]:
43
return [
@@ -86,7 +86,7 @@ def test_one_filtered_repo_files(allow_patterns: list[str], expected_bool: bool)
86
path_tmp_dir = Path(tmp_dir)
87
subfolder = path_tmp_dir / "subfolder"
88
subfolder.mkdir()
89
- (path_tmp_dir / "uncorrect.jpeg").touch()
89
+ (path_tmp_dir / "incorrect.jpeg").touch()
90
(subfolder / "correct.txt").touch()
91
92
def _glob_path() -> list[str]:
tests/v1/core/test_kv_cache_utils.py
+1
-1
@@ -308,7 +308,7 @@ def test_free_kv_cache_block_queue_append_n():
308
309
# Create an empty FreeKVCacheBlockQueue
310
invalid_queue = FreeKVCacheBlockQueue([])
311
- # set prev_free_block to None and this will cause assertation in append_n
311
+ # set prev_free_block to None and this will cause assertion in append_n
312
invalid_queue.fake_free_list_tail.prev_free_block = None
313
with pytest.raises(AssertionError):
314
# Append 1 block
tests/v1/core/test_prefix_caching.py
+4
-4
@@ -2304,22 +2304,22 @@ def test_block_lookup_cache_single_block_per_key():
2304
assert cache.get_one_block(key0) is block0
2305
assert cache.get_one_block(key1) is block1
2306
assert cache.get_one_block(key2) is None
2307
- # No block poped due to block_id mismatch
2307
+ # No block popped due to block_id mismatch
2308
assert cache.pop(key0, 100) is None
2309
assert cache.get_one_block(key0) is block0
2310
assert cache.get_one_block(key1) is block1
2311
assert cache.get_one_block(key2) is None
2312
- # block poped with (key0, block ID 0)
2312
+ # block popped with (key0, block ID 0)
2313
assert cache.pop(key0, 0) is block0
2314
assert cache.get_one_block(key0) is None
2315
assert cache.get_one_block(key1) is block1
2316
assert cache.get_one_block(key2) is None
2317
- # No block poped due to block_id mismatch
2317
+ # No block popped due to block_id mismatch
2318
assert cache.pop(key0, 1) is None
2319
assert cache.get_one_block(key0) is None
2320
assert cache.get_one_block(key1) is block1
2321
assert cache.get_one_block(key2) is None
2322
- # block poped with (key1, block ID 1)
2322
+ # block popped with (key1, block ID 1)
2323
assert cache.pop(key1, 1) is block1
2324
assert cache.get_one_block(key0) is None
2325
assert cache.get_one_block(key1) is None
tests/v1/core/test_priority_scheduler_random.py
+2
-2
@@ -140,7 +140,7 @@ def _mock_draft_token_ids(
140
return DraftTokenIds(req_ids=request_ids, draft_token_ids=sampled_token_ids)
141
142
143
-def _chech_valid_scheduler_output(
143
+def _check_valid_scheduler_output(
144
scheduler_output: SchedulerOutput,
145
seen_request_ids: set[str],
146
seen_mm_hashes: set[str],
@@ -242,7 +242,7 @@ def test_priority_scheduling_blast(
242
)
243
scheduler.add_request(req)
244
scheduler_output = scheduler.schedule()
245
- _chech_valid_scheduler_output(
245
+ _check_valid_scheduler_output(
246
scheduler_output, seen_request_ids, seen_mm_hashes
247
)
248
model_output = _mock_execute_model(
tests/v1/core/test_scheduler.py
+9
-9
@@ -1116,7 +1116,7 @@ def _step_until_done(
1116
1117
1118
def _step_until_kv_transfer_finished(scheduler: Scheduler, req_ids: list[str]):
1119
- """Cycle requests through a KV transfer cyle."""
1119
+ """Cycle requests through a KV transfer cycle."""
1120
1121
# Requests should first transition to WAITING_FOR_REMOTE_KVS
1122
output = scheduler.schedule()
@@ -2714,7 +2714,7 @@ def _assert_right_encoder_inputs(
2714
if expected_total_reqs == 0:
2715
return
2716
2717
- # Number of expected enocder inputs should match number of requests
2717
+ # Number of expected encoder inputs should match number of requests
2718
if expected_encoder_inputs:
2719
assert check_exist and requests is not None # only support expect input exist
2720
assert len(requests) == len(expected_encoder_inputs)
@@ -2964,7 +2964,7 @@ def test_ec_connector_with_partial_cache_hit_multi_round(use_kv_connector):
2964
)
2965
scheduler.update_from_output(output, model_output)
2966
2967
- # request1 is finished after outputing 1 token
2967
+ # request1 is finished after outputting 1 token
2968
# Finish request
2969
scheduler.finish_requests(request1.request_id, RequestStatus.FINISHED_LENGTH_CAPPED)
2970
@@ -3060,14 +3060,14 @@ def test_ec_connector_schedule_multiple_requests(cache_exist, use_kv_connector):
3060
for request in requests:
3061
scheduler.add_request(request)
3062
3063
- # Set up to test different encoder cache exsistence scenario after preemption
3063
+ # Set up to test different encoder cache existence scenario after preemption
3064
# Order of getting encoder cache should be: local cache -> connector-> compute
3065
scheduler.ec_connector.update_state_after_alloc = Mock(
3066
wraps=scheduler.ec_connector.update_state_after_alloc
3067
)
3068
3069
if cache_exist == "local":
3070
- # Allocate cache to cache manager manually to mimick
3070
+ # Allocate cache to cache manager manually to mimic
3071
for req in requests:
3072
scheduler.encoder_cache_manager.allocate(req, 0)
3073
else:
@@ -3384,13 +3384,13 @@ def test_priority_scheduling_ec_connector_preemption_and_resumption(
3384
pooler_output=[],
3385
)
3386
# Finish the requests to make room for the preempted requests to resume
3387
- # req_high is finished after outputing 2 tokens
3387
+ # req_high is finished after outputting 2 tokens
3388
scheduler.update_from_output(output, model_output)
3389
scheduler.finish_requests(
3390
request_high.request_id, RequestStatus.FINISHED_LENGTH_CAPPED
3391
)
3392
3393
- # Set up to test different encoder cache exsistence scenario after preemption
3393
+ # Set up to test different encoder cache existence scenario after preemption
3394
# Order of getting encoder cache should be: local cache -> connector-> compute
3395
# By default, the cache should still exist in local in this test case
3396
if cache_exist != "local":
@@ -3483,7 +3483,7 @@ def test_ec_connector_allocate_encoder_tokens_with_external_load(use_kv_connecto
3483
ec_role="ec_consumer",
3484
)
3485
3486
- # Limit the number of availiable slots of EncoderCacheManager
3486
+ # Limit the number of available slots of EncoderCacheManager
3487
scheduler.encoder_cache_manager = EncoderCacheManager(cache_size=32)
3488
3489
# Create MM request1
@@ -3574,7 +3574,7 @@ def test_ec_connector_allocate_encoder_tokens_with_external_load(use_kv_connecto
3574
)
3575
scheduler.update_from_output(output, model_output)
3576
3577
- # request1 is finished after outputing 1 token
3577
+ # request1 is finished after outputting 1 token
3578
# Finish request
3579
scheduler.finish_requests(request1.request_id, RequestStatus.FINISHED_LENGTH_CAPPED)
3580
assert scheduler.get_num_unfinished_requests() == 1
tests/v1/e2e/test_mamba_prefix_cache.py
+2
-2
@@ -76,11 +76,11 @@ def get_fake_sample_fn() -> SamplerOutput:
76
),
77
logprobs_tensors=None,
78
)
79
- accpeted_tokens = prompt_token_ids[
79
+ accepted_tokens = prompt_token_ids[
80
first_token_id_index : first_token_id_index
81
+ min(num_accepted_tokens, logits.shape[0])
82
]
83
- sampled_token_ids = accpeted_tokens
83
+ sampled_token_ids = accepted_tokens
84
return SamplerOutput(
85
sampled_token_ids=torch.tensor(
86
[sampled_token_ids], device="cuda", dtype=torch.int32
tests/v1/entrypoints/llm/test_struct_output_generate.py
+1
-1
@@ -911,7 +911,7 @@ def test_structured_output_with_structural_tag(backend: str):
911
),
912
)
913
914
- prompt = "Hello and repete hello 10 times, do not say anything else. Only say hello hello hello, now start"
914
+ prompt = "Hello and repeat hello 10 times, do not say anything else. Only say hello hello hello, now start"
915
outputs = llm.generate(prompt, sampling_params=sampling_params, use_tqdm=True)
916
assert outputs is not None
917
for output in outputs:
tests/v1/kv_connector/unit/test_kv_connector_lifecycle.py
renamed
tests/v1/kv_connector/unit/test_moriio_connector.py
+5
-5
@@ -99,7 +99,7 @@ def _setup_kv_transfer_request(request, remote_host="127.0.0.1", fake_port=4789)
99
return request
100
101
102
-class FakeMorIIOWrapper:
102
+class FakeMoRIIOWrapper:
103
# A fake MoRIIOWrapper for testing purposes
104
def __init__(self, *args, **kwargs):
105
pass
@@ -168,7 +168,7 @@ class FakeMorIIOWrapper:
168
pass
169
170
171
-class FakeMorIIOConnectorWorker(MoRIIOConnectorWorker):
171
+class FakeMoRIIOConnectorWorker(MoRIIOConnectorWorker):
172
# Define a fake remote engine id for testing
173
REMOTE_ENGINE_ID = "remote_engine"
174
@@ -373,7 +373,7 @@ def test_read_mode_loads_remote_block_ids(moriio_read_mode):
373
# Set remote block ids to be fetched.
374
request.kv_transfer_params["remote_block_ids"] = block_list
375
376
- # Remote Prefill, triggers MorIIOConnectorMetadata.
376
+ # Remote Prefill, triggers MoRIIOConnectorMetadata.
377
378
scheduler_output = scheduler.schedule()
379
kv_connector_metadata = scheduler_output.kv_connector_metadata
@@ -451,7 +451,7 @@ def test_register_kv_caches(mock_parallel_groups):
451
452
with set_current_vllm_config(vllm_config):
453
connector = MoRIIOConnector(vllm_config, KVConnectorRole.WORKER)
454
- connector.connector_worker = FakeMorIIOConnectorWorker(
454
+ connector.connector_worker = FakeMoRIIOConnectorWorker(
455
vllm_config, connector.engine_id, hand_shake_latency=0
456
)
457
@@ -528,7 +528,7 @@ def test_moriio_handshake_returns_metadata(mock_parallel_groups):
528
with (
529
patch(
530
"vllm.distributed.kv_transfer.kv_connector.v1.moriio.moriio_engine.MoRIIOWrapper",
531
- FakeMorIIOWrapper,
531
+ FakeMoRIIOWrapper,
532
),
533
):
534
handshake_port = _find_free_port()
tests/v1/kv_connector/unit/test_nixl_connector.py
+4
-4
@@ -460,9 +460,9 @@ class FakeNixlConnectorWorker(NixlConnectorWorker):
460
461
# When remote tp_size > local tp_size, handshake with multiple
462
# remote ranks.
463
- num_hanshakes = 1 if tp_ratio > 0 else -tp_ratio
463
+ num_handshakes = 1 if tp_ratio > 0 else -tp_ratio
464
remote_agents: dict[int, str] = {}
465
- for remote_tp_rank in range(num_hanshakes):
465
+ for remote_tp_rank in range(num_handshakes):
466
remote_agent_name = self.add_remote_agent(
467
NixlAgentMetadata(
468
engine_id=self.REMOTE_ENGINE_ID,
@@ -688,7 +688,7 @@ class TestNixlHandshake:
688
)
689
check_handshake(2)
690
691
- # NOTE flexiblity: a second remote with higher number of ranks is
691
+ # NOTE flexibility: a second remote with higher number of ranks is
692
# discovered. This is not a scenario we actively support right now, but
693
# the connector allows it.
694
worker.REMOTE_ENGINE_ID = "remote_engine_2"
@@ -1766,7 +1766,7 @@ def test_aborted_request_removed_from_worker_in_batch(default_vllm_config, dist_
1766
req = create_request(request_id=1, do_remote_decode=True, max_tokens=1)
1767
scheduler.add_request(req)
1768
1769
- # First scheduling pass - examinate build_connector_meta output
1769
+ # First scheduling pass - examine build_connector_meta output
1770
sched_out = scheduler.schedule()
1771
kv_meta = sched_out.kv_connector_metadata
1772
assert kv_meta is not None
tests/v1/sample/test_logprobs.py
+1
-1
@@ -36,7 +36,7 @@ SAMPLE_PROMPT = BatchLogprobsComposition.SAMPLE_PROMPT
36
# non-associative and sensitive to batch geometry. The ref LLM (no spec
37
# decode, default scheduling) and the spec-decode LLM (chunked prefill,
38
# different effective batch sizes) follow different reduction orders,
39
-# producing numerically divergent logprobs that get mis-attributed to
39
+# producing numerically divergent logprobs that get misattributed to
40
# spec-decode incorrectness.
41
#
42
# Force LLM instances into an identical, deterministic execution
tests/v1/sample/test_rejection_sampler.py
+3
-3
@@ -726,7 +726,7 @@ def test_frequency_penalties(rejection_sampler):
726
spec_tokens = [[1, 1, 1], [], [1, 1, 1]]
727
output_tokens = [[1, 1, 1, 1], [7], [1, 1, 1, 1]] # 1, 7 and 1 are the bonus tokens
728
729
- num_requsts = len(spec_tokens)
729
+ num_requests = len(spec_tokens)
730
logits = create_logits_tensor(output_tokens, token_idx_to_override=15)
731
metadata = create_sampling_metadata(
732
all_greedy=True,
@@ -734,8 +734,8 @@ def test_frequency_penalties(rejection_sampler):
734
spec_token_ids=spec_tokens,
735
prompt_token_ids=torch.tensor([[5, 6, 7], [6, 7, 8], [7, 8, 9]], device=DEVICE),
736
frequency_penalties=[1.5, 1.5, 0.7],
737
- presence_penalties=[0.0] * num_requsts,
738
- repetition_penalties=[1.0] * num_requsts,
737
+ presence_penalties=[0.0] * num_requests,
738
+ repetition_penalties=[1.0] * num_requests,
739
)
740
bonus_token_tensor = torch.tensor(
741
[output_tokens[i][-1] for i in range(len(output_tokens))], device=logits.device
vllm/_custom_ops.py
+2
-2
@@ -3106,7 +3106,7 @@ def cpu_attn_get_scheduler_metadata(
3106
isa: str,
3107
enable_kv_split: bool,
3108
) -> torch.Tensor:
3109
- sheduler_metadata = torch.ops._C.get_scheduler_metadata(
3109
+ scheduler_metadata = torch.ops._C.get_scheduler_metadata(
3110
num_reqs,
3111
num_heads,
3112
num_kv_heads,
@@ -3119,7 +3119,7 @@ def cpu_attn_get_scheduler_metadata(
3119
isa,
3120
enable_kv_split,
3121
)
3122
- return sheduler_metadata
3122
+ return scheduler_metadata
3123
3124
3125
def cpu_attn_reshape_and_cache(
vllm/config/compilation.py
+1
-1
@@ -872,7 +872,7 @@ class CompilationConfig:
872
)
873
874
# Currently only eager and inductor backend are supported.
875
- # for piecewise compilation. Custom backends are not suppported for
875
+ # for piecewise compilation. Custom backends are not supported for
876
# piecewise compilation. Update when more backends are supported.
877
if self.mode == CompilationMode.VLLM_COMPILE and self.backend not in [
878
"",
vllm/config/observability.py
+1
-1
@@ -59,7 +59,7 @@ class ObservabilityConfig:
59
60
enable_layerwise_nvtx_tracing: bool = False
61
"""Enable layerwise NVTX tracing. This traces the execution of each layer or
62
- module in the model and attach informations such as input/output shapes to
62
+ module in the model and attach information such as input/output shapes to
63
nvtx range markers. Noted that this doesn't work with CUDA graphs enabled."""
64
65
enable_mfu_metrics: bool = False
vllm/config/vllm.py
+1
-1
@@ -592,7 +592,7 @@ class VllmConfig:
592
593
If the user configuration does not specify a value for a default field
594
and if the default field is still None after all user selections are
595
- applied, then default values will be applied to the field. User speciied
595
+ applied, then default values will be applied to the field. User specified
596
fields will not be overridden by the default.
597
598
Args:
vllm/distributed/eplb/policy/default.py
+1
-1
@@ -44,7 +44,7 @@ class DefaultEplbPolicy(AbstractEplbPolicy):
44
rank_in_pack = np.zeros_like(pack_index, dtype=np.int64)
45
return pack_index, rank_in_pack
46
47
- # Sort and get indices in decending order
47
+ # Sort and get indices in descending order
48
indices = np.argsort(-weight, axis=-1)
49
50
pack_index = np.full((num_layers, num_groups), -1, dtype=np.int64)
vllm/distributed/kv_transfer/kv_connector/v1/base.py
+1
-1
@@ -129,7 +129,7 @@ class KVConnectorRole(enum.Enum):
129
class KVConnectorHandshakeMetadata(ABC): # noqa: B024
130
"""
131
Metadata used for out of band connector handshake between
132
- P/D workers. This needs to serializeable.
132
+ P/D workers. This needs to serializable.
133
"""
134
135
pass
vllm/distributed/kv_transfer/kv_connector/v1/lmcache_integration/vllm_v1_adapter.py
+2
-2
@@ -398,7 +398,7 @@ class ReqMeta:
398
)
399
400
401
-def need_gpu_interm_buffer(lmcache_config: LMCacheEngineConfig):
401
+def need_gpu_interim_buffer(lmcache_config: LMCacheEngineConfig):
402
return not lmcache_config.enable_pd
403
404
@@ -497,7 +497,7 @@ def _init_lmcache_engine(
497
use_mla,
498
)
499
500
- use_gpu = need_gpu_interm_buffer(lmcache_config)
500
+ use_gpu = need_gpu_interim_buffer(lmcache_config)
501
vllm_gpu_connector: (
502
VLLMBufferLayerwiseGPUConnector
503
| VLLMPagedMemGPUConnectorV2
vllm/distributed/kv_transfer/kv_connector/v1/mooncake/mooncake_connector.py
+7
-7
@@ -481,7 +481,7 @@ class MooncakeConnectorWorker:
481
)
482
483
self._remote_agents: dict[EngineId, dict[int, dict[int, str]]] = {}
484
- self._pending_bootstrap_querys: dict[str, asyncio.Event] = {}
484
+ self._pending_bootstrap_queries: dict[str, asyncio.Event] = {}
485
self.side_channel_port: int = 0 # we will bind it in register_kv_caches()
486
self.engine_id: EngineId = engine_id
487
self.tp_rank = get_tensor_model_parallel_rank()
@@ -1077,7 +1077,7 @@ class MooncakeConnectorWorker:
1077
response = self._xfer_resp_decoder.decode(ret_msg)
1078
if response.status == MooncakeXferResponseStatus.ERROR:
1079
logger.error(
1080
- "Error happens during tranfering kvcache for %s: %s",
1080
+ "Error happens during transferring kvcache for %s: %s",
1081
req_ids,
1082
response.err_msg,
1083
)
@@ -1140,8 +1140,8 @@ class MooncakeConnectorWorker:
1140
)
1141
1142
# Always notify others regardless of connection success or failure.
1143
- self._pending_bootstrap_querys[remote_bootstrap_addr].set()
1144
- del self._pending_bootstrap_querys[remote_bootstrap_addr]
1143
+ self._pending_bootstrap_queries[remote_bootstrap_addr].set()
1144
+ del self._pending_bootstrap_queries[remote_bootstrap_addr]
1145
1146
def receive_kv(
1147
self,
@@ -1171,11 +1171,11 @@ class MooncakeConnectorWorker:
1171
pull_metas: dict[ReqId, PullReqMeta],
1172
):
1173
remote_bootstrap_addr = next(iter(pull_metas.values())).remote_bootstrap_addr
1174
- if remote_bootstrap_addr not in self._pending_bootstrap_querys:
1175
- self._pending_bootstrap_querys[remote_bootstrap_addr] = asyncio.Event()
1174
+ if remote_bootstrap_addr not in self._pending_bootstrap_queries:
1175
+ self._pending_bootstrap_queries[remote_bootstrap_addr] = asyncio.Event()
1176
await self._connect_to_prefiller_bootstrap(remote_bootstrap_addr)
1177
else:
1178
- await self._pending_bootstrap_querys[remote_bootstrap_addr].wait()
1178
+ await self._pending_bootstrap_queries[remote_bootstrap_addr].wait()
1179
1180
if remote_engine_id not in self._remote_agents:
1181
logger.error(
vllm/distributed/kv_transfer/kv_connector/v1/offloading_connector.py
+1
-1
@@ -720,7 +720,7 @@ class OffloadPromMetrics(KVConnectorPromMetrics):
720
per_engine_labelvalues: dict[int, list[object]],
721
):
722
super().__init__(vllm_config, metric_types, labelnames, per_engine_labelvalues)
723
- # (engine_idx, transfer_tupe) -> (metric with bounded labels)
723
+ # (engine_idx, transfer_type) -> (metric with bounded labels)
724
self.histogram_transfer_size: dict[tuple[int, str], PromMetricT] = {}
725
self.counter_kv_bytes: dict[tuple[int, str], PromMetricT] = {}
726
self.counter_kv_transfer_time: dict[tuple[int, str], PromMetricT] = {}
vllm/entrypoints/openai/responses/serving.py
+3
-3
@@ -1647,9 +1647,9 @@ class OpenAIServingResponses(OpenAIServing):
1647
# TODO: in streaming, we noticed this bug:
1648
# https://github.com/vllm-project/vllm/issues/25697
1649
await self._initialize_tool_sessions(request, context, exit_stack)
1650
- processer = self._process_harmony_streaming_events
1650
+ processor = self._process_harmony_streaming_events
1651
else:
1652
- processer = self._process_simple_streaming_events
1652
+ processor = self._process_simple_streaming_events
1653
# TODO Hanchen make sampling params to include the structural tag
1654
1655
initial_response = ResponsesResponse.from_request(
@@ -1677,7 +1677,7 @@ class OpenAIServingResponses(OpenAIServing):
1677
)
1678
1679
try:
1680
- async for event_data in processer(
1680
+ async for event_data in processor(
1681
request,
1682
sampling_params,
1683
result_generator,
vllm/envs.py
+1
-1
@@ -1520,7 +1520,7 @@ environment_variables: dict[str, Callable[[], Any]] = {
1520
os.getenv("VLLM_DEEPEP_BUFFER_SIZE_MB", "1024")
1521
),
1522
# Force DeepEP to use intranode kernel for inter-node communication in
1523
- # high throughput mode. This is useful archive higher prefill throuhgput
1523
+ # high throughput mode. This is useful archive higher prefill throughput
1524
# on system supports multi-node nvlink (e.g GB200).
1525
"VLLM_DEEPEP_HIGH_THROUGHPUT_FORCE_INTRA_NODE": lambda: bool(
1526
int(os.getenv("VLLM_DEEPEP_HIGH_THROUGHPUT_FORCE_INTRA_NODE", "0"))
vllm/forward_context.py
+1
-1
@@ -175,7 +175,7 @@ class DPMetadata:
175
# Get the cumulative tokens across sequence parallel ranks.
176
# In this case the input to the MoEs will be distributed w.r.t both
177
# DP and TP rank.
178
- # When sp_size==1, this is just the cummulative num tokens across DP.
178
+ # When sp_size==1, this is just the cumulative num tokens across DP.
179
def cu_tokens_across_sp(self, sp_size: int) -> torch.Tensor:
180
num_tokens_across_sp_cpu = (
181
self.num_tokens_across_dp_cpu - 1 + sp_size
vllm/lora/layers/row_parallel_linear.py
+2
-2
@@ -57,10 +57,10 @@ class RowParallelLinearWithLoRA(BaseLinearLayerWithLoRA):
57
input_parallel = input_
58
else:
59
# TODO: simplify code below
60
- splitted_input = split_tensor_along_last_dim(
60
+ split_input = split_tensor_along_last_dim(
61
input_, num_partitions=self.tp_size
62
)
63
- input_parallel = splitted_input[self.tp_rank].contiguous()
63
+ input_parallel = split_input[self.tp_rank].contiguous()
64
65
# Matrix multiply.
66
bias_ = (
vllm/lora/lora_model.py
+3
-3
@@ -11,7 +11,7 @@ from vllm.lora.lora_weights import LoRALayerWeights
11
from vllm.lora.peft_helper import PEFTHelper
12
from vllm.lora.utils import (
13
get_lora_id,
14
- is_base_embeddding_weights,
14
+ is_base_embedding_weights,
15
parse_fine_tuned_lora_name,
16
)
17
from vllm.model_executor.model_loader.tensorizer import TensorizerConfig
@@ -86,7 +86,7 @@ class LoRAModel:
86
pin_memory = str(device) == "cpu" and is_pin_memory_available()
87
loras: dict[str, LoRALayerWeights] = {}
88
for tensor_name, tensor in tensors.items():
89
- if is_base_embeddding_weights(tensor_name):
89
+ if is_base_embedding_weights(tensor_name):
90
continue
91
# Skip modules based on model-defined prefixes (e.g., MTP layers)
92
if skip_prefixes and cls._should_skip_module(tensor_name, skip_prefixes):
@@ -162,7 +162,7 @@ class LoRAModel:
162
163
def check_unexpected_modules(modules: dict):
164
for lora_module in modules.keys(): # noqa
165
- if is_base_embeddding_weights(lora_module):
165
+ if is_base_embedding_weights(lora_module):
166
continue
167
# Handle PEFT file format where experts.base_layer is the
168
# gate_up_proj and experts is the down_proj
vllm/lora/utils.py
+1
-1
@@ -193,7 +193,7 @@ def parse_fine_tuned_lora_name(
193
raise ValueError(f"{name} is unsupported LoRA weight")
194
195
196
-def is_base_embeddding_weights(name: str) -> bool:
196
+def is_base_embedding_weights(name: str) -> bool:
197
# hardcoded subfixes for input & output embedding weights
198
embedding_suffixes = (
199
".embed_tokens.base_layer.weight",
vllm/model_executor/kernels/linear/mixed_precision/cpu.py
+1
-1
@@ -82,7 +82,7 @@ class CPUWNA16LinearKernel(MPLinearKernel):
82
weight = weight.permute(0, 2, 1).reshape(input_size, output_size).contiguous()
83
weight = pack_quantized_values_into_int32(weight, self.config.weight_type, 1)
84
# make 16 output channel as a block and transpose to the make
85
- # the block contigous
85
+ # the block contiguous
86
weight = (
87
weight.view(input_size, -1, 16 // pack_factor)
88
.permute(1, 0, 2)
vllm/model_executor/layers/attention/mla_attention.py
+1
-1
@@ -2540,7 +2540,7 @@ class MLACommonImpl(MLAAttentionImpl[M], Generic[M]):
2540
)
2541
# workspace
2542
# |------- N tokens --------|--------- N*dcp_size tokens ----------|
2543
- # |<- use for loca_gather ->|<--------- use for allgather -------->|
2543
+ # |<- use for local_gather ->|<--------- use for allgather -------->|
2544
allgather_offset = workspace.shape[0] // (dcp_world_size + 1)
2545
assert allgather_offset * (dcp_world_size + 1) == workspace.shape[0]
2546
assert toks <= allgather_offset
vllm/model_executor/layers/fused_moe/flashinfer_cutlass_moe.py
+1
-1
@@ -394,5 +394,5 @@ class FlashInferExperts(mk.FusedMoEExpertsModular):
394
395
def moe_sum(self, input: torch.Tensor, output: torch.Tensor) -> None:
396
# No support for LoRA in flashinfer_cutlass_fused_moe.
397
- # See TODOs in flashinfer functions runMoe and runMoeMinLantency.
397
+ # See TODOs in flashinfer functions runMoe and runMoeMinLatency.
398
raise NotImplementedError("LoRA is not supported for flashinfer_cutlass_moe")
vllm/model_executor/layers/fused_moe/fused_marlin_moe.py
+1
-1
@@ -409,7 +409,7 @@ def batched_fused_marlin_moe(
409
Note that the moe_align_block_size function indicates,
410
- What rows of the A matrix (hidden_states) to access during the
411
matmul, via sorted_ids output.
412
- - What expert_id to use for each block matmul, via expert_ids ouptut.
412
+ - What expert_id to use for each block matmul, via expert_ids output.
413
414
In the batched version, the tokens are already grouped/batched by experts
415
they subscribe to. Due to this, we can represent the batched hidden_states
vllm/model_executor/layers/fused_moe/modular_kernel.py
+3
-3
@@ -606,7 +606,7 @@ class FusedMoEExperts(ABC):
606
"""
607
Whether the kernel supports deployment in particular parallel config.
608
609
- Can be overriden if a kernel does not support EP, SP or some other
609
+ Can be overridden if a kernel does not support EP, SP or some other
610
configuration.
611
"""
612
raise NotImplementedError
@@ -620,7 +620,7 @@ class FusedMoEExperts(ABC):
620
"""
621
Whether the kernel supports a routing method (e.g. GroupedTopK).
622
623
- Can be overriden by monolithic kernels that execute the router
623
+ Can be overridden by monolithic kernels that execute the router
624
in addition to the experts if certain routers are not supported.
625
"""
626
return True
@@ -633,7 +633,7 @@ class FusedMoEExperts(ABC):
633
"""
634
Whether a kernel supports a particular dtype for router logits input.
635
636
- Can be overriden by monolithic kernels that execute the router
636
+ Can be overridden by monolithic kernels that execute the router
637
in addition to the experts if certain dtypes are not supported.
638
"""
639
return True
vllm/model_executor/layers/linear.py
+2
-2
@@ -1502,10 +1502,10 @@ class RowParallelLinear(LinearBase):
1502
if self.input_is_parallel:
1503
input_parallel = input_
1504
else:
1505
- splitted_input = split_tensor_along_last_dim(
1505
+ split_input = split_tensor_along_last_dim(
1506
input_, num_partitions=self.tp_size
1507
)
1508
- input_parallel = splitted_input[self.tp_rank].contiguous()
1508
+ input_parallel = split_input[self.tp_rank].contiguous()
1509
1510
# Matrix multiply.
1511
assert self.quant_method is not None
vllm/model_executor/layers/mla.py
+1
-1
@@ -35,7 +35,7 @@ class MultiHeadLatentAttentionWrapper(PluggableLayer):
35
"""Pluggable MLA layer which allows OOT backends to add
36
custom implementations of the outer MLA layer (including rope & o_proj).
37
Note that currently oot platforms can still use CustomOp.register_oot to
38
- replace MLA layer entirly, although we use PluggableLayer to register
38
+ replace MLA layer entirely, although we use PluggableLayer to register
39
this layer now.
40
41
This class takes positions and hidden_states as input.
vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors.py
+1
-1
@@ -191,7 +191,7 @@ class CompressedTensorsConfig(QuantizationConfig):
191
"""
192
Helper function to update target_scheme_map
193
since linear layers get fused into FusedMoE
194
- targetting 'Linear' needs to also match
194
+ targeting 'Linear' needs to also match
195
FusedMoE modules.
196
"""
197
if (
vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors_moe.py
+1
-1
@@ -2445,7 +2445,7 @@ class CompressedTensorsW4A8Fp8MoEMethod(CompressedTensorsMoEMethod):
2445
w2_scale=layer.w2_weight_scale, # group scale
2446
g1_alphas=layer.w13_weight_chan_scale,
2447
g2_alphas=layer.w2_weight_chan_scale,
2448
- per_act_token_quant=True, # always use dynamc per-token
2448
+ per_act_token_quant=True, # always use dynamic per-token
2449
per_out_ch_quant=True, # always use per-channel
2450
)
2451
vllm/model_executor/layers/quantization/cpu_wna16.py
+1
-1
@@ -261,7 +261,7 @@ class CPUAWQLinearMethod(LinearMethodBase):
261
262
zeros = pack_cols(zeros, bits, group_num, output_size).contiguous()
263
# make 16 output channel as a block and transpose to
264
- # the make the block contigous
264
+ # the make the block contiguous
265
weight = pack_cols(weight, bits, input_size, output_size)
266
weight = (
267
weight.view(input_size, -1, 16 // pack_factor)
vllm/model_executor/layers/quantization/torchao.py
+1
-1
@@ -199,7 +199,7 @@ class TorchAOConfig(QuantizationConfig):
199
200
@classmethod
201
def from_config_dict_json(cls, config_dict_json: str) -> "TorchAOConfig":
202
- """Iniitalize class from a config_dict json string, got from
202
+ """Initialize class from a config_dict json string, got from
203
torchao_config_object = some AOBaseConfig object
204
json.dumps(config_to_dict(torchao_config_object))
205
"""
vllm/model_executor/layers/quantization/utils/fp8_utils.py
+1
-1
@@ -255,7 +255,7 @@ def _flashinfer_fp8_blockscale_gemm_impl(
255
256
This batch-size-dependent selection is essential for maintaining model accuracy.
257
Benchmarks on GSM8K show a significant accuracy gap (88% vs 95%) for DeepSeek-V3.1
258
- when using FlashInfer's DeepGEMM on M>=32. The M < 32 strategy fixes the accurracy
258
+ when using FlashInfer's DeepGEMM on M>=32. The M < 32 strategy fixes the accuracy
259
drop.
260
261
Args:
vllm/model_executor/layers/quantization/utils/machete_utils.py
+2
-2
@@ -39,7 +39,7 @@ def query_machete_supported_group_sizes(act_type: torch.dtype) -> list[int]:
39
40
41
def check_machete_supports_shape(
42
- in_features: int, out_featrues: int
42
+ in_features: int, out_features: int
43
) -> tuple[bool, str | None]:
44
if in_features % MACHETE_PREPACKED_BLOCK_SHAPE[0] != 0:
45
return (
@@ -47,7 +47,7 @@ def check_machete_supports_shape(
47
"Input features size must be divisible by "
48
f"{MACHETE_PREPACKED_BLOCK_SHAPE[0]}",
49
)
50
- if out_featrues % MACHETE_PREPACKED_BLOCK_SHAPE[1] != 0:
50
+ if out_features % MACHETE_PREPACKED_BLOCK_SHAPE[1] != 0:
51
return (
52
False,
53
"Output features size must be divisible by "
vllm/model_executor/layers/rotary_embedding/common.py
+2
-2
@@ -237,7 +237,7 @@ class ApplyRotaryEmb(CustomOp):
237
Arguments of apply_rotary_emb() in vllm_flash_attn:
238
x: [batch_size, seq_len, nheads, headdim]
239
cos, sin: [seqlen_rotary, rotary_dim / 2]
240
- interleaved: defalut as False (Neox-style).
240
+ interleaved: default as False (Neox-style).
241
...
242
"""
243
interleaved = not self.is_neox_style
@@ -259,7 +259,7 @@ class ApplyRotaryEmb(CustomOp):
259
Arguments of apply_rotary() in flash_attn:
260
x: [batch_size, seq_len, nheads, headdim]
261
cos, sin: [seqlen_rotary, rotary_dim / 2]
262
- interleaved: defalut as False (Neox-style).
262
+ interleaved: default as False (Neox-style).
263
...
264
"""
265
interleaved = not self.is_neox_style
vllm/model_executor/models/ernie45_vl_moe.py
+6
-6
@@ -342,7 +342,7 @@ class Ernie4_5_VLMoeMoE(nn.Module):
342
visual_token_mask = visual_token_mask.repeat(1, self.hidden_size).bool()
343
text_token_mask = ~visual_token_mask
344
final_experts_hidden_states = torch.zeros_like(hidden_states)
345
- final_shared_ouput = (
345
+ final_shared_output = (
346
torch.zeros_like(hidden_states) if self.has_shared_experts else None
347
)
348
@@ -356,26 +356,26 @@ class Ernie4_5_VLMoeMoE(nn.Module):
356
text_router_logits, _ = self.text_experts_gate(
357
text_hidden_states.to(dtype=torch.float32)
358
)
359
- text_shared_ouput, text_experts_output = self.text_experts(
359
+ text_shared_output, text_experts_output = self.text_experts(
360
hidden_states=text_hidden_states, router_logits=text_router_logits
361
)
362
final_experts_hidden_states[text_token_mask] = text_experts_output.flatten()
363
if self.has_shared_experts:
364
- final_shared_ouput[text_token_mask] = text_shared_ouput.flatten()
364
+ final_shared_output[text_token_mask] = text_shared_output.flatten()
365
366
vision_router_logits, _ = self.vision_experts_gate(
367
vision_hidden_states.to(dtype=torch.float32)
368
)
369
- vision_shared_ouput, vision_experts_output = self.vision_experts(
369
+ vision_shared_output, vision_experts_output = self.vision_experts(
370
hidden_states=vision_hidden_states, router_logits=vision_router_logits
371
)
372
final_experts_hidden_states[visual_token_mask] = (
373
vision_experts_output.flatten()
374
)
375
if self.has_shared_experts:
376
- final_shared_ouput[visual_token_mask] = vision_shared_ouput.flatten()
376
+ final_shared_output[visual_token_mask] = vision_shared_output.flatten()
377
378
- final_hidden_states = (final_shared_ouput, final_experts_hidden_states)
378
+ final_hidden_states = (final_shared_output, final_experts_hidden_states)
379
else:
380
# only text modal input
381
text_router_logits, _ = self.text_experts_gate(
vllm/model_executor/models/fireredasr2.py
+1
-1
@@ -107,7 +107,7 @@ class Conv2dSubsampling(nn.Module):
107
)
108
109
self.subsampling = 4
110
- left_context = right_context = 3 # both exclude currect frame
110
+ left_context = right_context = 3 # both exclude current frame
111
self.context = left_context + 1 + right_context # 7
112
113
def forward(
vllm/model_executor/models/funasr.py
+9
-9
@@ -115,7 +115,7 @@ class EncoderLayerSANM(nn.Module):
115
hidden_states: torch.Tensor,
116
mask: torch.Tensor | None = None,
117
cache=None,
118
- mask_shfit_chunk=None,
118
+ mask_shift_chunk=None,
119
mask_att_chunk_encoder=None,
120
):
121
residual = hidden_states
@@ -125,14 +125,14 @@ class EncoderLayerSANM(nn.Module):
125
hidden_states = residual + self.self_attn(
126
hidden_states,
127
mask,
128
- mask_shfit_chunk=mask_shfit_chunk,
128
+ mask_shift_chunk=mask_shift_chunk,
129
mask_att_chunk_encoder=mask_att_chunk_encoder,
130
)
131
else:
132
hidden_states = self.self_attn(
133
hidden_states,
134
mask,
135
- mask_shfit_chunk=mask_shfit_chunk,
135
+ mask_shift_chunk=mask_shift_chunk,
136
mask_att_chunk_encoder=mask_att_chunk_encoder,
137
)
138
@@ -140,7 +140,7 @@ class EncoderLayerSANM(nn.Module):
140
hidden_states = self.norm2(hidden_states)
141
hidden_states = residual + self.feed_forward(hidden_states)
142
143
- return hidden_states, mask, cache, mask_shfit_chunk, mask_att_chunk_encoder
143
+ return hidden_states, mask, cache, mask_shift_chunk, mask_att_chunk_encoder
144
145
146
class MultiHeadedAttentionSANM(nn.Module):
@@ -183,13 +183,13 @@ class MultiHeadedAttentionSANM(nn.Module):
183
self,
184
inputs: torch.Tensor,
185
mask: torch.Tensor,
186
- mask_shfit_chunk: torch.Tensor = None,
186
+ mask_shift_chunk: torch.Tensor = None,
187
):
188
b, t, d = inputs.size()
189
if mask is not None:
190
mask = torch.reshape(mask, (b, -1, 1))
191
- if mask_shfit_chunk is not None:
192
- mask = mask * mask_shfit_chunk
191
+ if mask_shift_chunk is not None:
192
+ mask = mask * mask_shift_chunk
193
inputs = inputs * mask
194
195
x = inputs.transpose(1, 2)
@@ -243,11 +243,11 @@ class MultiHeadedAttentionSANM(nn.Module):
243
self,
244
hidden_states: torch.Tensor,
245
mask: torch.Tensor,
246
- mask_shfit_chunk: torch.Tensor = None,
246
+ mask_shift_chunk: torch.Tensor = None,
247
mask_att_chunk_encoder: torch.Tensor = None,
248
):
249
q_h, k_h, v_h, v = self.forward_qkv(hidden_states)
250
- fsmn_memory = self.forward_fsmn(v, mask, mask_shfit_chunk)
250
+ fsmn_memory = self.forward_fsmn(v, mask, mask_shift_chunk)
251
q_h = q_h * self.d_k ** (-0.5)
252
scores = torch.matmul(q_h, k_h.transpose(-2, -1))
253
att_outs = self.forward_attention(v_h, scores, mask, mask_att_chunk_encoder)
vllm/model_executor/models/isaac.py
+1
-1
@@ -646,7 +646,7 @@ class IsaacImageProcessor:
646
return_tensors: str | TensorType | None,
647
**kwargs: Unpack[IsaacImageProcessorKwargs],
648
) -> BatchFeature:
649
- """Preprocess images into format compatibile with vLLM input processing."""
649
+ """Preprocess images into format compatible with vLLM input processing."""
650
651
all_pixel_values: list[torch.Tensor] = []
652
all_image_grids: list[torch.Tensor] = []
vllm/model_executor/models/keye.py
+1
-1
@@ -299,7 +299,7 @@ class KeyeVisionEmbeddings(nn.Module):
299
)
300
(
301
batch_size,
302
- squence_len,
302
+ sequence_len,
303
channel,
304
height,
305
width,
vllm/model_executor/models/longcat_flash.py
+8
-8
@@ -238,7 +238,7 @@ class LongcatRouter(nn.Module):
238
self,
239
config: FlashConfig,
240
zero_expert_num: int,
241
- rounter_params_dtype: torch.dtype,
241
+ router_params_dtype: torch.dtype,
242
prefix: str = "",
243
):
244
super().__init__()
@@ -252,12 +252,12 @@ class LongcatRouter(nn.Module):
252
config.hidden_size,
253
self.n_routed_experts,
254
bias=config.router_bias,
255
- params_dtype=rounter_params_dtype,
255
+ params_dtype=router_params_dtype,
256
quant_config=None,
257
prefix=f"{prefix}.classifier",
258
)
259
self.e_score_correction_bias = nn.Parameter(
260
- torch.zeros((self.n_routed_experts), dtype=rounter_params_dtype)
260
+ torch.zeros((self.n_routed_experts), dtype=router_params_dtype)
261
)
262
263
def forward(self, hidden_states):
@@ -281,14 +281,14 @@ class LongcatMoe(nn.Module):
281
super().__init__()
282
self.hidden_size = hidden_size
283
# Gate always runs at half / full precision for now.
284
- self.rounter_params_dtype = params_dtype
284
+ self.router_params_dtype = params_dtype
285
if config.router_dtype == "float32":
286
- self.rounter_params_dtype = torch.float32
286
+ self.router_params_dtype = torch.float32
287
288
self.router = LongcatRouter(
289
config=config,
290
zero_expert_num=config.zero_expert_num,
291
- rounter_params_dtype=self.rounter_params_dtype,
291
+ router_params_dtype=self.router_params_dtype,
292
prefix=f"{prefix}.gate",
293
)
294
@@ -309,7 +309,7 @@ class LongcatMoe(nn.Module):
309
prefix=f"{prefix}.experts",
310
enable_eplb=enable_eplb,
311
routed_scaling_factor=config.routed_scaling_factor,
312
- router_logits_dtype=self.rounter_params_dtype,
312
+ router_logits_dtype=self.router_params_dtype,
313
)
314
315
def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
@@ -329,7 +329,7 @@ class LongcatMoe(nn.Module):
329
hidden_states_padded = hidden_states
330
331
router_logits_full = self.router(
332
- hidden_states_padded.to(self.rounter_params_dtype)
332
+ hidden_states_padded.to(self.router_params_dtype)
333
)
334
335
# ZeroExpertFusedMoE handles routing memoization and zero expert computation
vllm/model_executor/models/molmo2.py
+4
-4
@@ -1321,14 +1321,14 @@ def get_image_size(image: ImageInput) -> ImageSize:
1321
raise ValueError(f"Unknown image type: {type(image)}")
1322
1323
1324
-def exif_tranpose(
1324
+def exif_transpose(
1325
images: ImageInput | None,
1326
) -> ImageInput | None:
1327
if images is None:
1328
return None
1329
if images is not None and isinstance(images, (list, tuple)):
1330
images = [
1331
- exif_tranpose(img) if isinstance(img, Image) else img for img in images
1331
+ exif_transpose(img) if isinstance(img, Image) else img for img in images
1332
]
1333
elif images is not None and isinstance(images, Image):
1334
images = ImageOps.exif_transpose(images)
@@ -1667,7 +1667,7 @@ class Molmo2ProcessorWrapper:
1667
**kwargs: object,
1668
) -> BatchFeature:
1669
inputs = [text]
1670
- images = exif_tranpose(images)
1670
+ images = exif_transpose(images)
1671
if getattr(self.processor, "image_processor", None) is not None:
1672
inputs.append(images)
1673
if getattr(self.processor, "video_processor", None) is not None:
@@ -2352,7 +2352,7 @@ class Molmo2MultiModalProcessor(BaseMultiModalProcessor[Molmo2ProcessingInfo]):
2352
def get_image_replacement_molmo2(item_idx: int) -> list[int]:
2353
images = mm_items.get_items("image", ImageProcessorItems)
2354
image = images.get(item_idx)
2355
- image = exif_tranpose(image)
2355
+ image = exif_transpose(image)
2356
2357
resize_nrows, resize_cols = processor.get_base_grid_size(is_video=False)
2358
if use_single_crop_col_tokens is not None:
vllm/model_executor/models/nemotron_h.py
+2
-2
@@ -349,7 +349,7 @@ class NemotronHMoEDecoderLayer(nn.Module):
349
super().__init__()
350
self.config = config
351
352
- # Get per-layer config for heterogeneous models if exsist
352
+ # Get per-layer config for heterogeneous models if exists
353
get_layer_config = getattr(config, "get_nemotron_h_config_for_layer", None)
354
layer_config = get_layer_config(layer_idx) if get_layer_config else config
355
@@ -517,7 +517,7 @@ class NemotronHAttentionDecoderLayer(nn.Module):
517
) -> None:
518
super().__init__()
519
520
- # Get per-layer config for heterogeneous models if exsist
520
+ # Get per-layer config for heterogeneous models if exists
521
get_layer_config = getattr(config, "get_nemotron_h_config_for_layer", None)
522
layer_config = get_layer_config(layer_idx) if get_layer_config else config
523
vllm/model_executor/models/paddleocr_vl.py
+1
-1
@@ -486,7 +486,7 @@ class SiglipVisionEmbeddings(nn.Module):
486
)
487
(
488
batch_size,
489
- squence_len,
489
+ sequence_len,
490
channel,
491
height,
492
width,
vllm/model_executor/models/phi4mm_audio.py
+6
-6
@@ -689,19 +689,19 @@ class ConformerEncoder(TransformerEncoderBase):
689
default False.
690
ext_pw_out_channel: int, optional
691
the number of channel for CNN
692
- before depthwise_seperable_CNN.
692
+ before depthwise_separable_CNN.
693
If 0 then use linear. default 0.
694
ext_pw_kernel_size: int, optional
695
- kernel size of N before depthwise_seperable_CNN.
695
+ kernel size of N before depthwise_separable_CNN.
696
only work for ext_pw_out_channel > 0.
697
default 1
698
depthwise_seperable_out_channel: int, optional
699
the number of channel for
700
- depthwise_seperable_CNN.
700
+ depthwise_separable_CNN.
701
default 256.
702
depthwise_multiplier: int, optional
703
the number of multiplier for
704
- depthwise_seperable_CNN.
704
+ depthwise_separable_CNN.
705
default 1.
706
chunk_se: int, optional
707
0 for offline SE.
@@ -711,7 +711,7 @@ class ConformerEncoder(TransformerEncoderBase):
711
by only the current chunk.
712
default 0.
713
kernel_size: int, optional
714
- the number of kernels for depthwise_seperable_CNN.
714
+ the number of kernels for depthwise_separable_CNN.
715
default 3.
716
activation: str, optional
717
FeedForward block activation.
@@ -721,7 +721,7 @@ class ConformerEncoder(TransformerEncoderBase):
721
activation function used in ConvModule part
722
of the conformer, default "relu".
723
conv_glu_type: str, optional
724
- activation used use glu in depthwise_seperable_CNN,
724
+ activation used use glu in depthwise_separable_CNN,
725
default "sigmoid"
726
bias_in_glu: bool, optional
727
if set to True, use additive bias in the weight module
vllm/model_executor/models/phi4mm_utils.py
+3
-3
@@ -217,8 +217,8 @@ class GLUPointWiseConv(nn.Module):
217
return x
218
219
220
-class DepthWiseSeperableConv1d(nn.Module):
221
- """DepthWiseSeperableConv1d module used in Convnet module
220
+class DepthWiseSeparableConv1d(nn.Module):
221
+ """DepthWiseSeparableConv1d module used in ConvNet module
222
for the conformer, for more details see:
223
https://arxiv.org/pdf/2005.08100v1.pdf
224
@@ -390,7 +390,7 @@ class ConvModule(nn.Module):
390
else:
391
padding = (kernel_size - 1) // 2
392
393
- self.dw_sep_conv_1d = DepthWiseSeperableConv1d(
393
+ self.dw_sep_conv_1d = DepthWiseSeparableConv1d(
394
input_dim,
395
depthwise_seperable_out_channel,
396
kernel_size,
vllm/model_executor/models/qwen2_vl.py
+1
-1
@@ -916,7 +916,7 @@ class Qwen2VLProcessingInfo(BaseProcessingInfo):
916
self, max_pixels: int | None = None
917
) -> ImageSize:
918
# NOTE: Simply processing a huge size with _get_vision_info might not give a
919
- # size that maximizes the number of featrues, i.e., the number of (merged)
919
+ # size that maximizes the number of features, i.e., the number of (merged)
920
# patches. This is because the number of patches limits the allowed aspect
921
# ratios. For example, suppose the maximum number of patches is 1280. A square
922
# image cannot be broken down into 1280 patches, so feeding a giant square image
vllm/model_executor/models/step3_vl.py
+2
-2
@@ -459,14 +459,14 @@ class Step3VLProcessor:
459
image_inputs = {}
460
text_inputs = self.tokenizer(text)
461
else:
462
- splitted_images_data = self._split_images(images)
462
+ split_images_data = self._split_images(images)
463
pixel_values_lst = []
464
patch_pixel_values_lst = []
465
patch_newline_mask_lst = []
466
image_repl_str_lst = []
467
image_repl_ids_lst = []
468
num_patches = []
469
- for raw_img, img_patches, patch_newline_mask in splitted_images_data:
469
+ for raw_img, img_patches, patch_newline_mask in split_images_data:
470
pixel_values_lst.extend(self._convert_images_to_pixel_values([raw_img]))
471
472
if len(img_patches) > 0:
vllm/model_executor/models/step3p5.py
+1
-1
@@ -353,7 +353,7 @@ class FusedMoEBlock(nn.Module):
353
if swiglu_limit not in (None, 0):
354
swiglu_limit = float(swiglu_limit)
355
assert swiglu_limit == 7.0, (
356
- "Swiglu limit in fused moe block only suport 7.0 now."
356
+ "Swiglu limit in fused moe block only support 7.0 now."
357
)
358
activation = "swiglustep"
359
logger.debug(
vllm/reasoning/ernie45_reasoning_parser.py
+3
-3
@@ -18,7 +18,7 @@ logger = init_logger(__name__)
18
class Ernie45ReasoningParser(BaseThinkingReasoningParser):
19
"""
20
Reasoning parser for Ernie45 thinking model.
21
- The Ernie45 thinking model ouput format is
21
+ The Ernie45 thinking model output format is
22
abc\n</think>\n\n<response>\ndef\n</response>\n
23
or abc\n</think>\ndef
24
"""
@@ -73,7 +73,7 @@ class Ernie45ReasoningParser(BaseThinkingReasoningParser):
73
Extract reasoning content from a delta message.
74
Handles streaming output where previous + delta = current.
75
Uses token IDs for faster processing.
76
- The Ernie45 thinking model ouput format is
76
+ The Ernie45 thinking model output format is
77
abc\n</think>\n\n<response>\ndef\n</response>\n
78
or abc\n</think>\ndef
79
- 'abc' goes to reasoning
@@ -148,7 +148,7 @@ class Ernie45ReasoningParser(BaseThinkingReasoningParser):
148
) -> tuple[str | None, str | None]:
149
"""
150
Extract reasoning content from the model output.
151
- The Ernie45 thinking model ouput format is
151
+ The Ernie45 thinking model output format is
152
abc\n</think>\n\n\n<response>\ndef\n</response>\n
153
or abc\n</think>\ndef
154
- 'abc' goes to reasoning
vllm/renderers/hf.py
+1
-1
@@ -564,7 +564,7 @@ def replace_vision_chunk_video_placeholder(
564
mm_data: "MultiModalDataDict",
565
video_placeholder: str | None,
566
) -> str | list[int]:
567
- # get video placehoder, replace it with runtime video-chunk prompts
567
+ # get video placeholder, replace it with runtime video-chunk prompts
568
if video_placeholder and isinstance(prompt_raw, str):
569
video_prompts = build_video_prompts_from_mm_data(mm_data)
570
vllm/renderers/inputs/preprocess.py
+1
-1
@@ -1,5 +1,5 @@
1
"""
2
-Schemas and utilites for preprocessing inputs.
2
+Schemas and utilities for preprocessing inputs.
3
"""
4
5
# SPDX-License-Identifier: Apache-2.0
vllm/renderers/inputs/tokenize.py
+1
-1
@@ -1,5 +1,5 @@
1
"""
2
-Schemas and utilites for tokenization inputs.
2
+Schemas and utilities for tokenization inputs.
3
"""
4
5
# SPDX-License-Identifier: Apache-2.0
vllm/tokenizers/mistral.py
+2
-2
@@ -169,7 +169,7 @@ def _prepare_apply_chat_template_tools_and_messages(
169
tool.pop(tool_key)
170
logger.warning_once(
171
f"'{tool_key}' is not supported by mistral-common for tools. "
172
- "It has been poped from the tool definition."
172
+ "It has been popped from the tool definition."
173
)
174
if tool["type"] == "function":
175
function_keys = list(tool["function"].keys())
@@ -178,7 +178,7 @@ def _prepare_apply_chat_template_tools_and_messages(
178
tool["function"].pop(function_key)
179
logger.warning_once(
180
f"'{function_key}' is not supported by mistral-common "
181
- "for function tools. It has been poped from the "
181
+ "for function tools. It has been popped from the "
182
"function definition."
183
)
184
else:
vllm/transformers_utils/processors/ovis2_5.py
+1
-1
@@ -402,7 +402,7 @@ class Ovis2_5Processor(ProcessorMixin):
402
images = [images]
403
elif video is not None:
404
is_video = True
405
- # type of vidoe in dummy_mm_data is np.ndarray
405
+ # type of video in dummy_mm_data is np.ndarray
406
if isinstance(video, np.ndarray):
407
images = []
408
for i in range(video.shape[0]):
vllm/v1/attention/backends/cpu_attn.py
+2
-2
@@ -174,7 +174,7 @@ class CPUAttentionMetadataBuilder(AttentionMetadataBuilder[CPUAttentionMetadata]
174
query_start_loc = query_start_loc[: num_decodes + 1]
175
block_table_tensor = block_table_tensor[:num_decodes]
176
177
- sheduler_metadata = ops.cpu_attn_get_scheduler_metadata(
177
+ scheduler_metadata = ops.cpu_attn_get_scheduler_metadata(
178
num_reqs=num_reqs,
179
num_heads=self.num_heads,
180
num_kv_heads=self.num_kv_heads,
@@ -197,7 +197,7 @@ class CPUAttentionMetadataBuilder(AttentionMetadataBuilder[CPUAttentionMetadata]
197
seq_lens=seq_lens,
198
block_table=block_table_tensor,
199
slot_mapping=slot_mapping,
200
- scheduler_metadata=sheduler_metadata,
200
+ scheduler_metadata=scheduler_metadata,
201
causal=causal,
202
use_sdpa_prefill=self.use_sdpa_prefill,
203
num_decode_tokens=num_decode_tokens,
vllm/v1/attention/backends/mamba_attn.py
+1
-1
@@ -383,7 +383,7 @@ class BaseMambaAttentionMetadataBuilder(AttentionMetadataBuilder[M], abc.ABC):
383
384
# Return a tensor of shape (#requests, #max blocks)
385
state_indices_tensor = common_attn_metadata.block_table_tensor
386
- # Additional cache-related varaiables:
386
+ # Additional cache-related variables:
387
mamba_block_size = self.kv_cache_spec.block_size
388
(
389
block_idx_last_computed_token,
vllm/v1/attention/backends/mla/flashmla_sparse.py
+3
-3
@@ -49,14 +49,14 @@ if TYPE_CHECKING:
49
50
logger = init_logger(__name__)
51
52
-# For FP8 sparse attention we have two impelementations:
52
+# For FP8 sparse attention we have two implementations:
53
# 1. Mixed batch mode: use the FP8 decode kernel for both prefill and decode this is
54
# done by treating all tokens as single batch.
55
# 2. Separate prefill and decode mode: use the BF16 prefill kernel for prefill
56
# (upconverting the FP8 cache to BF16 then calling the prefill kernel) and using
57
# the FP8 decode kernel for decode.
58
# Currently we use #1 when the number of heads per rank is low (i.e. TP) since the BF16
59
-# prefill kernel requires padding the numer of heads to 128 while the decode does not
59
+# prefill kernel requires padding the number of heads to 128 while the decode does not
60
# so when the per ranke head count is below MIN_HEADS_FOR_BF16_PREFILL we use the mixed
61
# batch mode (#2).
62
MIN_HEADS_FOR_BF16_PREFILL = 32
@@ -126,7 +126,7 @@ class FlashMLASparseBackend(AttentionBackend):
126
cache_dtype_str: str = "auto",
127
) -> tuple[int, ...]:
128
if cache_dtype_str == "fp8_ds_mla":
129
- # custom storage fromat is 656 bytes
129
+ # custom storage format is 656 bytes
130
# see FlashMLA readme.md for details
131
return (num_blocks, block_size, 656)
132
else:
vllm/v1/attention/backends/rocm_aiter_fa.py
+3
-3
@@ -370,7 +370,7 @@ class AiterFlashAttentionMetadata:
370
slot_mapping: torch.Tensor
371
block_table: torch.Tensor
372
373
- # prefill and deocde split
373
+ # prefill and decode split
374
num_decodes: int
375
num_decode_tokens: int
376
num_prefills: int
@@ -1099,7 +1099,7 @@ class AiterFlashAttentionImpl(AttentionImpl):
1099
extend_tokens_slice = slice(
1100
num_decode_tokens, num_decode_tokens + num_extend_tokens
1101
)
1102
- extend_querys = query[extend_tokens_slice]
1102
+ extend_queries = query[extend_tokens_slice]
1103
extend_keys = key[extend_tokens_slice]
1104
extend_values = value[extend_tokens_slice]
1105
extend_outputs = output[extend_tokens_slice]
@@ -1110,7 +1110,7 @@ class AiterFlashAttentionImpl(AttentionImpl):
1110
v_scale = attn_metadata.v_scale
1111
self.extend_forward(
1112
attn_metadata=attn_metadata,
1113
- query=extend_querys,
1113
+ query=extend_queries,
1114
key=extend_keys,
1115
value=extend_values,
1116
key_cache=key_cache,
vllm/v1/core/single_type_kv_cache_manager.py
+1
-1
@@ -863,7 +863,7 @@ class MambaManager(SingleTypeKVCacheManager):
863
):
864
# Mamba can't rely on blocks generated by other requests in the current step
865
# To put it in the next step, we return num_gpu_blocks + 1 so
866
- # that kv_cache_manager will think there is no enough blocks to allocte now
866
+ # that kv_cache_manager will think there is no enough blocks to allocate now
867
# and don't schedule it in the current step.
868
return self.block_pool.num_gpu_blocks + 1
869
if self.mamba_cache_mode != "align":
vllm/v1/engine/core.py
+2
-2
@@ -1724,11 +1724,11 @@ class DPEngineCoreProc(EngineCoreProc):
1724
"""
1725
Send notifications to EngineCoreClient, which can then forward
1726
the notifications to other engine core processes. It is used for:
1727
- 1) In scale up: new core engines to notify exisiting core engines
1727
+ 1) In scale up: new core engines to notify existing core engines
1728
that they are ready;
1729
2) In scale down: removing core engines to notify EngineCoreClient
1730
so EngineCoreClient can release their ray placement groups;
1731
- 3) Both scale up/down: to notify EngineCoreClient that exisiting
1731
+ 3) Both scale up/down: to notify EngineCoreClient that existing
1732
core engines have already switched to the new parallel setup.
1733
"""
1734
if vllm_config is None:
vllm/v1/engine/input_processor.py
+1
-1
@@ -194,7 +194,7 @@ class InputProcessor:
194
@staticmethod
195
def assign_request_id(request: EngineCoreRequest):
196
"""Replace the externally supplied request ID with an internal request ID
197
- that adds 8 random characters in order to ensure uniquness.
197
+ that adds 8 random characters in order to ensure uniqueness.
198
"""
199
if request.external_req_id is not None:
200
raise ValueError(
vllm/v1/kv_offload/worker/cpu_gpu.py
+1
-1
@@ -197,7 +197,7 @@ class SingleDirectionOffloadingHandler(OffloadingHandler):
197
transfer = self._transfers.popleft()
198
transfer_time = (
199
transfer.start_event.elapsed_time(transfer.end_event) * 1e-3
200
- ) # elapsed_time is in miliseconds
200
+ ) # elapsed_time is in milliseconds
201
result = TransferResult(
202
job_id=transfer.job_id,
203
success=True,
vllm/v1/worker/gpu_model_runner.py
+11
-11
@@ -905,7 +905,7 @@ class GPUModelRunner(
905
Args:
906
scheduler_output: The scheduler output.
907
"""
908
- # Attention free models have zero kv_cache_goups, however models
908
+ # Attention free models have zero kv_cache_groups, however models
909
# like Mamba are also attention free but use the kv_cache for
910
# keeping its internal state. This is why we check the number
911
# of kv_cache groups instead of solely checking
@@ -1065,7 +1065,7 @@ class GPUModelRunner(
1065
# of the request. for example:
1066
# fist step: num_computed_tokens = 0, spec_tokens = [],
1067
# prev_num_draft_len = 0.
1068
- # second step: num_computed_tokens = 100(prompt lenth),
1068
+ # second step: num_computed_tokens = 100(prompt length),
1069
# spec_tokens = [a,b], prev_num_draft_len = 0.
1070
# third step: num_computed_tokens = 100 + 2, spec_tokens = [c,d],
1071
# prev_num_draft_len = 2.
@@ -1412,30 +1412,30 @@ class GPUModelRunner(
1412
prev_draft_token_indices.extend(range(start, start + draft_len))
1413
indices_match &= prev_index == flattened_index
1414
max_flattened_index = max(max_flattened_index, flattened_index)
1415
- num_commmon_tokens = len(sample_flattened_indices)
1415
+ num_common_tokens = len(sample_flattened_indices)
1416
total_without_spec = total_num_scheduled_tokens - total_num_spec_tokens
1417
- if num_commmon_tokens < total_without_spec:
1417
+ if num_common_tokens < total_without_spec:
1418
# If not all requests are decodes from the last iteration,
1419
# We need to copy the input_ids_cpu to the GPU first.
1420
self.input_ids.copy_to_gpu(total_num_scheduled_tokens)
1421
if self.enable_prompt_embeds:
1422
self.inputs_embeds.copy_to_gpu(total_num_scheduled_tokens)
1423
self.is_token_ids.copy_to_gpu(total_num_scheduled_tokens)
1424
- if num_commmon_tokens == 0:
1424
+ if num_common_tokens == 0:
1425
# No requests in common with the previous iteration
1426
# So input_ids.cpu will have all the input ids.
1427
return
1428
- if indices_match and max_flattened_index == (num_commmon_tokens - 1):
1428
+ if indices_match and max_flattened_index == (num_common_tokens - 1):
1429
# Common-case optimization: the batch is unchanged
1430
# and no reordering happened.
1431
# The indices are both the same permutation of 0..N-1 so
1432
# we can copy directly using a single slice.
1433
- self.input_ids.gpu[:num_commmon_tokens].copy_(
1434
- self.input_batch.prev_sampled_token_ids[:num_commmon_tokens, 0],
1433
+ self.input_ids.gpu[:num_common_tokens].copy_(
1434
+ self.input_batch.prev_sampled_token_ids[:num_common_tokens, 0],
1435
non_blocking=True,
1436
)
1437
if self.enable_prompt_embeds:
1438
- self.is_token_ids.gpu[:num_commmon_tokens] = True
1438
+ self.is_token_ids.gpu[:num_common_tokens] = True
1439
return
1440
# Upload the index tensors asynchronously so the scatter can be non-blocking.
1441
sampled_tokens_index_tensor = torch.tensor(
@@ -4383,7 +4383,7 @@ class GPUModelRunner(
4383
self.model.compile(fullgraph=True, backend=backend)
4384
return
4385
# for other compilation modes, cudagraph behavior is controlled by
4386
- # CudagraphWraper and CudagraphDispatcher of vllm.
4386
+ # CudagraphWrapper and CudagraphDispatcher of vllm.
4387
4388
# wrap the model with full cudagraph wrapper if needed.
4389
cudagraph_mode = self.compilation_config.cudagraph_mode
@@ -4444,7 +4444,7 @@ class GPUModelRunner(
4444
:param weights_path: path to load weights from if weights_iterator is not
4445
provided. Use path of original model if neither is provided.
4446
:param is_checkpoint_format: set to False if weights have already been processed
4447
- into kernel format (repacking, renaming, ect.)
4447
+ into kernel format (repacking, renaming, etc.)
4448
"""
4449
# TODO(@kylesayrs): generalize to all runners and loaders
4450
# argument validation