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 (#24026)
Signed-off-by: Didier Durand <durand.didier@gmail.com>
Didier Durand committed
Sep 1, 2025 at 11:38 UTC
107284959ac14d42aba09a03220ff21da1eafcb2
14 files changed
+17
-17
examples/offline_inference/multilora_inference.py
+1
-1
@@ -23,7 +23,7 @@ def create_test_prompts(
23
2 requests for base model, 4 requests for the LoRA. We define 2
24
different LoRA adapters (using the same model for demo purposes).
25
Since we also set `max_loras=1`, the expectation is that the requests
26
- with the second LoRA adapter will be ran after all requests with the
26
+ with the second LoRA adapter will be run after all requests with the
27
first adapter have finished.
28
"""
29
return [
vllm/distributed/device_communicators/pynccl.py
+1
-1
@@ -31,7 +31,7 @@ class PyNcclCommunicator:
31
group: the process group to work on. If None, it will use the
32
default process group.
33
device: the device to bind the PyNcclCommunicator to. If None,
34
- it will be bind to f"cuda:{local_rank}".
34
+ it will be bound to f"cuda:{local_rank}".
35
library_path: the path to the NCCL library. If None, it will
36
use the default library path.
37
It is the caller's responsibility to make sure each communicator
vllm/distributed/parallel_state.py
+2
-2
@@ -939,8 +939,8 @@ def get_pipeline_model_parallel_group():
939
def graph_capture(device: torch.device):
940
"""
941
`graph_capture` is a context manager which should surround the code that
942
- is capturing the CUDA graph. Its main purpose is to ensure that the
943
- some operations will be run after the graph is captured, before the graph
942
+ is capturing the CUDA graph. Its main purpose is to ensure that some
943
+ operations will be run after the graph is captured, before the graph
944
is replayed. It returns a `GraphCaptureContext` object which contains the
945
necessary data for the graph capture. Currently, it only contains the
946
stream that the graph capture is running on. This stream is set to the
vllm/entrypoints/openai/tool_parsers/pythonic_tool_parser.py
+1
-1
@@ -165,7 +165,7 @@ class PythonicToolParser(ToolParser):
165
index] += delta.function.arguments
166
167
# HACK: serving_chat.py inspects the internal state of tool parsers
168
- # when determining it's final streaming delta, automatically
168
+ # when determining its final streaming delta, automatically
169
# adding autocompleted JSON.
170
# These two lines avoid that nonsense while ensuring finish_reason
171
# is set to tool_calls when at least one tool is called.
vllm/model_executor/layers/fused_moe/moe_pallas.py
+1
-1
@@ -7,7 +7,7 @@ import torch.nn.functional as F
7
8
def _histogram(input: torch.Tensor, min: int, max: int) -> torch.Tensor:
9
"""
10
- Compute the histogram of a int32 tensor. The bin edges are defined by the
10
+ Compute the histogram of an int32 tensor. The bin edges are defined by the
11
min and max values, with step = 1.
12
"""
13
assert input.dtype == torch.int32, "input must be of torch.int32 dtype."
vllm/model_executor/models/ovis.py
+1
-1
@@ -544,7 +544,7 @@ class Ovis(nn.Module, SupportsMultiModal, SupportsPP):
544
vision_embeddings)
545
input_ids = None
546
547
- # up until here we have a inputs_embeds 100% numerical identity
547
+ # up until here we have an inputs_embeds 100% numerical identity
548
# between the OG HF Transformers implementation and ours
549
hidden_states = self.llm(
550
input_ids=input_ids,
vllm/model_executor/models/phi4mm_audio.py
+3
-3
@@ -43,7 +43,7 @@ class ConformerEncoderLayer(nn.Module):
43
if set different to 0, the number of
44
depthwise_seperable_out_channel will be used as a
45
channel_out of the second conv1d layer.
46
- otherwise, it equal to 0, the second conv1d layer is skipped.
46
+ otherwise, it equals to 0, the second conv1d layer is skipped.
47
depthwise_multiplier: int
48
number of input_dim channels duplication. this value
49
will be used to compute the hidden channels of the Conv1D.
@@ -115,7 +115,7 @@ class ConformerEncoderLayer(nn.Module):
115
we recalculate activation in backward.
116
default "".
117
export: bool, optional
118
- if set to True, it remove the padding from convolutional layers
118
+ if set to True, it removes the padding from convolutional layers
119
and allow the onnx conversion for inference.
120
default False.
121
use_pt_scaled_dot_product_attention: bool, optional
@@ -686,7 +686,7 @@ class ConformerEncoder(TransformerEncoderBase):
686
only work for glu_in_attention !=0
687
default "swish".
688
export: bool, optional
689
- if set to True, it remove the padding from convolutional layers
689
+ if set to True, it removes the padding from convolutional layers
690
and allow the onnx conversion for inference.
691
default False.
692
activation_checkpointing: str, optional
vllm/model_executor/models/phi4mm_utils.py
+1
-1
@@ -258,7 +258,7 @@ class DepthWiseSeperableConv1d(nn.Module):
258
if set different to 0, the number of
259
depthwise_seperable_out_channel will be used as a channel_out
260
of the second conv1d layer.
261
- otherwise, it equal to 0, the second conv1d layer is skipped.
261
+ otherwise, it equals to 0, the second conv1d layer is skipped.
262
kernel_size: int
263
kernel_size
264
depthwise_multiplier: int
vllm/third_party/pynvml.py
+1
-1
@@ -1022,7 +1022,7 @@ def _extractNVMLErrorsAsClasses():
1022
Each NVML Error gets a new NVMLError subclass. This way try,except blocks can filter appropriate
1023
exceptions more easily.
1024
1025
- NVMLError is a parent class. Each NVML_ERROR_* gets it's own subclass.
1025
+ NVMLError is a parent class. Each NVML_ERROR_* gets its own subclass.
1026
e.g. NVML_ERROR_ALREADY_INITIALIZED will be turned into NVMLError_AlreadyInitialized
1027
'''
1028
this_module = sys.modules[__name__]
vllm/transformers_utils/configs/nemotron.py
+1
-1
@@ -26,7 +26,7 @@ logger = logging.get_logger(__name__)
26
class NemotronConfig(PretrainedConfig):
27
r"""
28
This is the configuration class to store the configuration of a
29
- [`NemotronModel`]. It is used to instantiate an Nemotron model
29
+ [`NemotronModel`]. It is used to instantiate a Nemotron model
30
according to the specified arguments, defining the model architecture.
31
Instantiating a configuration with the defaults will yield a similar
32
configuration to that of the Nemotron-8B.
vllm/transformers_utils/configs/nemotron_h.py
+1
-1
@@ -38,7 +38,7 @@ class NemotronHConfig(PretrainedConfig):
38
passed when calling [`NemotronHModel`]
39
tie_word_embeddings (`bool`, *optional*, defaults to `False`):
40
Whether the model's input and output word embeddings should be
41
- tied. Note that this is only relevant if the model has a output
41
+ tied. Note that this is only relevant if the model has an output
42
word embedding layer.
43
hidden_size (`int`, *optional*, defaults to 4096):
44
Dimension of the hidden representations.
vllm/transformers_utils/processors/ovis.py
+1
-1
@@ -55,7 +55,7 @@ class OvisProcessorKwargs(ProcessingKwargs, total=False): # type: ignore[call-
55
56
class OvisProcessor(ProcessorMixin):
57
r"""
58
- Constructs a Ovis processor which wraps a Ovis image processor and a Qwen2 tokenizer into a single processor.
58
+ Constructs an Ovis processor which wraps an Ovis image processor and a Qwen2 tokenizer into a single processor.
59
[`OvisProcessor`] offers all the functionalities of [`Qwen2VLImageProcessor`] and [`Qwen2TokenizerFast`]. See the
60
[`~OvisProcessor.__call__`] and [`~OvisProcessor.decode`] for more information.
61
Args:
vllm/transformers_utils/processors/ovis2_5.py
+1
-1
@@ -41,7 +41,7 @@ class Ovis2_5ProcessorKwargs(ProcessingKwargs,
41
42
class Ovis2_5Processor(ProcessorMixin):
43
r"""
44
- Constructs a Ovis processor which wraps a Ovis image processor
44
+ Constructs an Ovis processor which wraps an Ovis image processor
45
and a Qwen2 tokenizer into a single processor.
46
[`OvisProcessor`] offers all the functionalities of
47
[`Qwen2VLImageProcessor`] and [`Qwen2TokenizerFast`].
vllm/v1/spec_decode/ngram_proposer.py
+1
-1
@@ -107,7 +107,7 @@ def _find_longest_matched_ngram_and_propose_tokens(
107
longest_ngram = 0
108
position = 0
109
110
- # lps[0] always equal to 0, we starts with index 1
110
+ # lps[0] always equal to 0, we start with index 1
111
prev_lps = 0
112
i = 1
113
while i < total_token: