@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 0235103cbb
Fork 0

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 (#24042)

Signed-off-by: Didier Durand <durand.didier@gmail.com> Co-authored-by: Jee Jee Li <pandaleefree@gmail.com>

Didier Durand committed Sep 2, 2025 at 04:07 UTC 0235103cbbdb511e6708aae600f759060a797c16
12 files changed +14 -14
vllm/distributed/device_communicators/quick_all_reduce.py
+1 -1
@@ -78,7 +78,7 @@ class QuickAllReduce:
78 group: the process group to work on. If None, it will use the
79 default process group.
80 device: the device to bind the CustomAllreduce to. If None,
81 - it will be bind to f"cuda:{local_rank}".
81 + it will be bound to f"cuda:{local_rank}".
82 It is the caller's responsibility to make sure each communicator
83 is bind to a unique device, and all communicators in this group
84 are in the same node.
vllm/distributed/device_communicators/ray_communicator.py
+1 -1
@@ -186,7 +186,7 @@ class RayPPCommunicator(Communicator):
186 """
187 Receive a torch.Tensor from a peer and synchronize the current stream.
188
189 - After this call returns, the receive buffer is safe to read from from
189 + After this call returns, the receive buffer is safe to read from
190 any stream. An RayChannelError will be raised if an error occurred
191 (e.g., remote actor died), and the buffer is not safe to read.
192
vllm/entrypoints/openai/run_batch.py
+1 -1
@@ -161,7 +161,7 @@ async def write_local_file(output_path: str,
161 batch_outputs: The list of batch outputs to write.
162 """
163 # We should make this async, but as long as run_batch runs as a
164 - # standalone program, blocking the event loop won't effect performance.
164 + # standalone program, blocking the event loop won't affect performance.
165 with open(output_path, "w", encoding="utf-8") as f:
166 for o in batch_outputs:
167 print(o.model_dump_json(), file=f)
vllm/entrypoints/openai/serving_responses.py
+1 -1
@@ -728,7 +728,7 @@ class OpenAIServingResponses(OpenAIServing):
728 for response_msg in request.input:
729 messages.append(
730 parse_response_input(response_msg, prev_outputs))
731 - # User passes in a a tool call request and its output. We need
731 + # User passes in a tool call request and its output. We need
732 # to add the tool call request to prev_outputs so that the
733 # parse_response_input can find the tool call request when
734 # parsing the tool call output.
vllm/executor/ray_utils.py
+1 -1
@@ -223,7 +223,7 @@ def _wait_until_pg_ready(current_placement_group: "PlacementGroup"):
223
224 """
225 # Wait until PG is ready - this will block until all
226 - # requested resources are available, and will timeout
226 + # requested resources are available, and will time out
227 # if they cannot be provisioned.
228 placement_group_specs = current_placement_group.bundle_specs
229
vllm/model_executor/layers/quantization/utils/quant_utils.py
+1 -1
@@ -116,7 +116,7 @@ def _normalize_quant_group_shape(x: torch.Tensor, group_shape: GroupShape):
116 # then we would expand a to:
117 # a = [[1, 1, 2, 2],
118 # [3, 3, 4, 4]]
119 -# NOTE this function this function does not explicitly broadcast dimensions
119 +# NOTE this function does not explicitly broadcast dimensions
120 # with an extent of 1, since this can be done implicitly by pytorch
121 def group_broadcast(t, shape):
122 for i, s in enumerate(shape):
vllm/model_executor/models/registry.py
+1 -1
@@ -185,7 +185,7 @@ _EMBEDDING_MODELS = {
185 "Phi3VForCausalLM": ("phi3v", "Phi3VForCausalLM"),
186 "Qwen2VLForConditionalGeneration": ("qwen2_vl", "Qwen2VLForConditionalGeneration"), # noqa: E501
187 # Technically PrithviGeoSpatialMAE is a model that works on images, both in
188 - # input and output. I am adding it here because it piggy-backs on embedding
188 + # input and output. I am adding it here because it piggybacks on embedding
189 # models for the time being.
190 "PrithviGeoSpatialMAE": ("prithvi_geospatial_mae", "PrithviGeoSpatialMAE"),
191 }
vllm/model_executor/sampling_metadata.py
+1 -1
@@ -97,7 +97,7 @@ class SamplingMetadataCache:
97 class SamplingMetadata:
98 """Metadata for input sequences. Used in sampler.
99
100 - The usage is as follow;
100 + The usage is as follows;
101 ```
102 hidden_states = execute_model(...)
103 logits = hidden_states[sampling_metadata.selected_token_indices]
vllm/scalar_type.py
+1 -1
@@ -269,7 +269,7 @@ class ScalarType:
269
270 @classmethod
271 def uint(cls, size_bits: int, bias: Optional[int]) -> 'ScalarType':
272 - """Create a unsigned integer scalar type."""
272 + """Create an unsigned integer scalar type."""
273 ret = cls(0, size_bits, False, bias if bias else 0)
274 ret.id # noqa B018: make sure the id is cached
275 return ret
vllm/sequence.py
+1 -1
@@ -1193,7 +1193,7 @@ class HiddenStates(msgspec.Struct, array_like=True,
1193 seq_ids are the sequence ids of each entry of the batch
1194 dimension of the hidden_states tensor"""
1195 # Scorer hidden states. For prefill step, it is used for hidden states of
1196 - # all tokens, whereas for decode step, it use used for last accepted tokens.
1196 + # all tokens, whereas for decode step, it is used for last accepted tokens.
1197 hidden_states: torch.Tensor
1198 # The sequence group metadata list. Only needed for decode step.
1199 seq_group_metadata_list: Optional[list[SequenceGroupMetadata]] = None
vllm/v1/core/sched/scheduler.py
+3 -3
@@ -815,7 +815,7 @@ class Scheduler(SchedulerInterface):
815 # NOTE: structured_output_request_ids maps
816 # a request's (request that uses structured output)
817 # request_id to its index in the batch.
818 - # This will helps us determine to slice the grammar bitmask
818 + # This will help us determine to slice the grammar bitmask
819 # and only applies valid mask for requests that
820 # uses structured decoding.
821 structured_output_request_ids: dict[str, int] = {}
@@ -923,7 +923,7 @@ class Scheduler(SchedulerInterface):
923 request):
924 # NOTE: structured_output_request
925 # should not be None if use_structured_output, we have
926 - # check above, so safe to ignore type warning
926 + # checked above, so safe to ignore type warning
927 request.structured_output_request.grammar.accept_tokens( # type: ignore[union-attr]
928 req_id, new_token_ids)
929
@@ -1242,7 +1242,7 @@ class Scheduler(SchedulerInterface):
1242 finished_sending reqs to the output.
1243 * if finished_sending: free the blocks
1244 # if finished_recving: add to state so we can
1245 - scheduler the request during the next step.
1245 + schedule the request during the next step.
1246 """
1247
1248 if self.connector is not None:
vllm/v1/metrics/stats.py
+1 -1
@@ -59,7 +59,7 @@ class RequestStateStats:
59
60 num_generation_tokens: int = 0
61
62 - # This is a engine frontend timestamp (wall-clock)
62 + # This is an engine frontend timestamp (wall-clock)
63 arrival_time: float = 0.0
64
65 # These are engine core timestamps (monotonic)