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 15, 04:45 UTC
Fix: Check the type of params to be a Sequence not list. (#19910)
Signed-off-by: Rabin Adhikari <rabin.adk1@gmail.com>
Rabin Adhikari committed
Jun 21, 2025 at 01:03 UTC
8ca81bb0691bf8909ecb6eb4dd43f4af6dcaaa66
1 file changed
+3
-3
vllm/entrypoints/llm.py
+3
-3
@@ -1450,15 +1450,15 @@ class LLM:
1450
prompts = [prompts]
1451
1452
num_requests = len(prompts)
1453
- if isinstance(params, list) and len(params) != num_requests:
1453
+ if isinstance(params, Sequence) and len(params) != num_requests:
1454
raise ValueError("The lengths of prompts and params "
1455
"must be the same.")
1456
if isinstance(lora_request,
1457
- list) and len(lora_request) != num_requests:
1457
+ Sequence) and len(lora_request) != num_requests:
1458
raise ValueError("The lengths of prompts and lora_request "
1459
"must be the same.")
1460
1461
- for sp in params if isinstance(params, list) else (params, ):
1461
+ for sp in params if isinstance(params, Sequence) else (params, ):
1462
if isinstance(sp, SamplingParams):
1463
self._add_guided_params(sp, guided_options)
1464