Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
a302a8fd
Unverified
Commit
a302a8fd
authored
Apr 16, 2026
by
daiyu1111
Committed by
GitHub
Apr 16, 2026
Browse files
[Bugfix] Fix LLM priority normalization for single-string prompts (#40011)
Signed-off-by:
daiyu1111
<
2356690121@qq.com
>
parent
4e8c3f1c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
tests/entrypoints/llm/test_generate.py
tests/entrypoints/llm/test_generate.py
+6
-0
vllm/entrypoints/llm.py
vllm/entrypoints/llm.py
+1
-1
No files found.
tests/entrypoints/llm/test_generate.py
View file @
a302a8fd
...
...
@@ -91,6 +91,12 @@ def test_multiple_priority(llm: LLM):
outputs
=
llm
.
generate
(
PROMPTS
,
sampling_params
=
None
,
priority
=
[])
def
test_single_prompt_priority
(
llm
:
LLM
):
# Single string prompts should be normalized to one request.
outputs
=
llm
.
generate
(
PROMPTS
[
0
],
sampling_params
=
None
,
priority
=
[
0
])
assert
len
(
outputs
)
==
1
def
test_max_model_len
():
max_model_len
=
20
llm
=
LLM
(
...
...
vllm/entrypoints/llm.py
View file @
a302a8fd
...
...
@@ -1575,7 +1575,7 @@ class LLM:
seq_prompts
=
prompt_to_seq
(
prompts
)
seq_params
=
self
.
_params_to_seq
(
params
,
len
(
seq_prompts
))
seq_lora_requests
=
self
.
_lora_request_to_seq
(
lora_request
,
len
(
seq_prompts
))
seq_priority
=
self
.
_priority_to_seq
(
priority
,
len
(
prompts
))
seq_priority
=
self
.
_priority_to_seq
(
priority
,
len
(
seq_
prompts
))
return
self
.
_render_and_add_requests
(
prompts
=
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment