@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / d386ab1412
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 10, 17:45 UTC

[Docs] Improve malformed exception caused by backslash line continuations (#31694)

Signed-off-by: maang <maang_h@163.com> Signed-off-by: maang <55082429+maang-h@users.noreply.github.com> Co-authored-by: Cyrus Leung <cyrus.tl.leung@gmail.com> Co-authored-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com>

maang committed Jan 6, 2026 at 09:51 UTC d386ab141273041693455d33651a3cba6a12e8d1
7 files changed +14 -17
vllm/config/compilation.py
+3 -3
@@ -839,9 +839,9 @@ class CompilationConfig:
839 """
840 if self.mode is None:
841 raise ValueError(
842 - "No compilation mode is set. This method should only be \
843 - called via vllm config where the level is set if none is \
844 - provided."
842 + "No compilation mode is set. This method should only be "
843 + "called via vllm config where the level is set if none is "
844 + "provided."
845 )
846 if self.mode == CompilationMode.NONE:
847 raise ValueError("No compilation mode is set.")
vllm/model_executor/layers/fused_moe/rocm_aiter_fused_moe.py
+1 -2
@@ -231,8 +231,7 @@ def rocm_aiter_fused_experts(
231 # w8a8 block-scaled
232 if quant_config.block_shape is not None and quant_config.use_fp8_w8a8:
233 assert not apply_router_weight_on_input, (
234 - "apply_router_weight_on_input is\
235 - not supported for block scaled moe"
234 + "apply_router_weight_on_input is not supported for block scaled moe"
235 )
236 assert quant_config.w1_scale is not None
237 assert quant_config.w2_scale is not None
vllm/model_executor/model_loader/weight_utils.py
+2 -2
@@ -681,8 +681,8 @@ def safetensors_weights_iterator(
681 # instead we reconstruct the subclasses here before returning
682 if not torchao_version_at_least("0.15.0"):
683 raise ValueError(
684 - "Please use torchao version >= 0.15.0 \
685 - to load torchao safetensors checkpoint"
684 + "Please use torchao version >= 0.15.0 "
685 + "to load torchao safetensors checkpoint"
686 )
687 from torchao.prototype.safetensors.safetensors_support import (
688 unflatten_tensor_state_dict,
vllm/model_executor/models/llama.py
+2 -2
@@ -201,8 +201,8 @@ class LlamaAttention(nn.Module):
201 # This is a target model, use layer_idx directly
202 effective_layer_idx = layer_idx
203 assert effective_layer_idx < len(layer_types), (
204 - f"effective_layer_idx: {effective_layer_idx} \
205 - is out of bounds for layer_types: {layer_types}"
204 + f"effective_layer_idx: {effective_layer_idx} "
205 + f"is out of bounds for layer_types: {layer_types}"
206 )
207
208 is_sliding = layer_types[effective_layer_idx] == "sliding_attention"
vllm/model_executor/models/phi4mm.py
+3 -4
@@ -428,14 +428,13 @@ class Phi4MMImageEncoder(nn.Module):
428 output_imgs.append(torch.cat([sub_img, self.glb_GN, glb_img], dim=1))
429 else:
430 raise NotImplementedError(
431 - f'hd_transform_order = {self.hd_transform_order}, "\
432 - "not implemented'
431 + f"hd_transform_order = {self.hd_transform_order}, not implemented"
432 )
433
434 # temp_len = int((h*w+1)*144 + 1 + (h+1)*12)
435 assert temp_len == output_imgs[-1].shape[1], (
437 - f'temp_len: {temp_len}, output_imgs[-1].shape[1]: "\
438 - "{output_imgs[-1].shape[1]}'
436 + f"temp_len: {temp_len}, output_imgs[-1].shape[1]: "
437 + f"{output_imgs[-1].shape[1]}"
438 )
439
440 output_len.append(temp_len)
vllm/multimodal/registry.py
+2 -2
@@ -367,8 +367,8 @@ class MultiModalRegistry:
367 # than whisper.
368 return 0
369 assert len(max_tokens) == 1, (
370 - "Encoder-decoder models are expected \
371 - to implement the multimodal interface with at most one modality."
370 + "Encoder-decoder models are expected "
371 + "to implement the multimodal interface with at most one modality."
372 )
373
374 first_modality = next(iter(max_tokens))
vllm/utils/argparse_utils.py
+1 -2
@@ -399,8 +399,7 @@ class FlexibleArgumentParser(ArgumentParser):
399 index = args.index("--config")
400 if index == len(args) - 1:
401 raise ValueError(
402 - "No config file specified! \
403 - Please check your command-line arguments."
402 + "No config file specified! Please check your command-line arguments."
403 )
404
405 file_path = args[index + 1]