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 14, 05:30 UTC
[Doc]: fix typos in Python comments (#24173)
Signed-off-by: Didier Durand <durand.didier@gmail.com> Co-authored-by: Russell Bryant <rbryant@redhat.com> Co-authored-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com>
Didier Durand committed
Sep 4, 2025 at 17:52 UTC
83609ca91d42c8847d1b4c272b011a0b6c27319e
12 files changed
+13
-13
benchmarks/benchmark_dataset.py
+1
-1
@@ -403,7 +403,7 @@ class RandomDataset(BenchmarkDataset):
403
# [6880, 6881] -> ['Ġcalls', 'here'] ->
404
# [1650, 939, 486] -> ['Ġcall', 'sh', 'ere']
405
# To avoid uncontrolled change of the prompt length,
406
- # the encoded sequence is truncated before being decode again.
406
+ # the encoded sequence is truncated before being decoded again.
407
total_input_len = prefix_len + int(input_lens[i])
408
re_encoded_sequence = tokenizer.encode(prompt, add_special_tokens=False)[
409
:total_input_len
benchmarks/kernels/benchmark_lora.py
+1
-1
@@ -637,7 +637,7 @@ def bench_optype(
637
# Clear LoRA optimization hash-maps.
638
_LORA_A_PTR_DICT.clear()
639
_LORA_B_PTR_DICT.clear()
640
- # Run bench function so that _LORA_A_PTR_DICT and _LORA_B_PTR_DICT are setup
640
+ # Run bench function so that _LORA_A_PTR_DICT and _LORA_B_PTR_DICT are set up
641
for kwargs in kwargs_list:
642
op_type.bench_fn()(**kwargs)
643
torch.cuda.synchronize()
benchmarks/multi_turn/benchmark_serving_multi_turn.py
+1
-1
@@ -962,7 +962,7 @@ async def main_mp(
962
963
# At this point all the clients finished,
964
# collect results (TTFT, TPOT, etc.) from all the clients.
965
- # This needs to happens before calling join on the clients
965
+ # This needs to happen before calling join on the clients
966
# (result_queue should be emptied).
967
while not result_queue.empty():
968
client_metrics.append(result_queue.get())
examples/offline_inference/audio_language.py
+1
-1
@@ -117,7 +117,7 @@ def run_gemma3n(question: str, audio_count: int) -> ModelRequestData:
117
118
# Granite Speech
119
def run_granite_speech(question: str, audio_count: int) -> ModelRequestData:
120
- # NOTE - the setting in this example are somehat different than what is
120
+ # NOTE - the setting in this example are somewhat different from what is
121
# optimal for granite speech, and it is generally recommended to use beam
122
# search. Check the model README for suggested settings.
123
# https://huggingface.co/ibm-granite/granite-speech-3.3-8b
tests/models/multimodal/generation/vlm_utils/builders.py
+1
-1
@@ -250,7 +250,7 @@ def build_video_inputs_from_test_info(
250
251
def apply_image_size_scaling(image, size: Union[float, tuple[int, int]],
252
size_type: SizeType):
253
- """Applies a size scaler to one image; this can be a an image size factor,
253
+ """Applies a size scaler to one image; this can be an image size factor,
254
which scales the image while maintaining the aspect ratio"""
255
# Special case for embeddings; if it's a tensor, it's only valid if we
256
# are considering size factors at constant scale, i.e., we just clone
tests/models/multimodal/generation/vlm_utils/case_filtering.py
+1
-1
@@ -42,7 +42,7 @@ def get_filtered_test_settings(
42
else:
43
assert test_info.prompt_formatter is not None
44
45
- # Everything looks okay; keep if this is has correct proc handling
45
+ # Everything looks okay; keep if this is correct proc handling
46
if (test_info.distributed_executor_backend
47
is not None) == new_proc_per_test:
48
matching_tests[test_name] = test_info
vllm/attention/backends/mla/common.py
+1
-1
@@ -822,7 +822,7 @@ class MLACommonMetadataBuilder(AttentionMetadataBuilder[T], Generic[T]):
822
and context_lens_tensor is not None \
823
and context_lens_tensor[:self.num_prefills].max() > 0:
824
825
- # NOTE: it is recommend you read the `Chunked Prefill` section in
825
+ # NOTE: it is recommended you read the `Chunked Prefill` section in
826
# the comment at the top of the file before trying to understand
827
# the following code
828
vllm/engine/async_llm_engine.py
+1
-1
@@ -717,7 +717,7 @@ class AsyncLLMEngine(EngineClient):
717
# Stop the execute model loop in parallel workers until there
718
# are more requests to process. This avoids waiting
719
# indefinitely in torch.distributed ops which may otherwise
720
- # timeout, and unblocks the RPC thread in the workers so that
720
+ # time out, and unblocks the RPC thread in the workers so that
721
# they can process any other queued control plane messages,
722
# such as add/remove lora adapters.
723
await engine.engine.stop_remote_worker_execution_loop_async()
vllm/engine/multiprocessing/client.py
+1
-1
@@ -270,7 +270,7 @@ class MQLLMEngineClient(EngineClient):
270
queue.put_nowait(request_output)
271
272
async def setup(self):
273
- """Setup the client before it starts sending server requests."""
273
+ """Set up the client before it starts sending server requests."""
274
275
# Start output_loop
276
if self.output_loop is None:
vllm/model_executor/layers/quantization/awq_triton.py
+1
-1
@@ -19,7 +19,7 @@ def awq_dequantize_kernel(
19
num_rows, # input num rows in qweight
20
BLOCK_SIZE_X: tl.constexpr,
21
BLOCK_SIZE_Y: tl.constexpr):
22
- # Setup the pids.
22
+ # Set up the pids.
23
pid_x = tl.program_id(axis=0)
24
pid_y = tl.program_id(axis=1)
25
vllm/model_executor/layers/quantization/base_config.py
+1
-1
@@ -128,7 +128,7 @@ class QuantizationConfig(ABC):
128
@staticmethod
129
def get_from_keys_or(config: dict[str, Any], keys: list[str],
130
default: Any) -> Any:
131
- """Get a optional value from the model's quantization config."""
131
+ """Get an optional value from the model's quantization config."""
132
try:
133
return QuantizationConfig.get_from_keys(config, keys)
134
except ValueError:
vllm/v1/attention/backends/mla/common.py
+2
-2
@@ -401,7 +401,7 @@ M = TypeVar("M", bound=MLACommonMetadata)
401
402
403
def use_flashinfer_prefill() -> bool:
404
- # For blackwell default to flashinfer prefill if its available since
404
+ # For blackwell default to flashinfer prefill if it's available since
405
# it is faster than FA2.
406
return (flashinfer_available and not envs.VLLM_USE_CUDNN_PREFILL
407
and current_platform.is_device_capability(100))
@@ -1018,7 +1018,7 @@ class MLACommonImpl(MLAAttentionImpl[M], Generic[M]):
1018
return layer.weight
1019
1020
# we currently do not have quantized bmm's which are needed for
1021
- # `W_UV` and `W_UK_T`, we we just store fp16/bf16 copies and perform
1021
+ # `W_UV` and `W_UK_T`, we just store fp16/bf16 copies and perform
1022
# the bmm's in 16-bit, the extra memory overhead of this is fairly low
1023
kv_b_proj_weight = get_and_maybe_dequant_weights(self.kv_b_proj).T
1024
assert kv_b_proj_weight.shape == (