Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
SIYIXNI
vllm
Commits
2bdea7ac
You need to sign in or sign up before continuing.
Unverified
Commit
2bdea7ac
authored
Jul 17, 2023
by
Zhuohan Li
Committed by
GitHub
Jul 17, 2023
Browse files
[Fix] Fix the condition of max_seq_len (#477)
parent
58df2883
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
vllm/core/scheduler.py
vllm/core/scheduler.py
+1
-1
vllm/engine/llm_engine.py
vllm/engine/llm_engine.py
+1
-1
No files found.
vllm/core/scheduler.py
View file @
2bdea7ac
...
@@ -190,7 +190,7 @@ class Scheduler:
...
@@ -190,7 +190,7 @@ class Scheduler:
break
break
num_prompt_tokens
=
seq_group
.
get_seqs
()[
0
].
get_len
()
num_prompt_tokens
=
seq_group
.
get_seqs
()[
0
].
get_len
()
if
num_prompt_tokens
>
=
self
.
scheduler_config
.
max_seq_len
:
if
num_prompt_tokens
>
self
.
scheduler_config
.
max_seq_len
:
logger
.
warning
(
logger
.
warning
(
f
"Input prompt (
{
num_prompt_tokens
}
tokens) is too long"
f
"Input prompt (
{
num_prompt_tokens
}
tokens) is too long"
" and exceeds limit of "
" and exceeds limit of "
...
...
vllm/engine/llm_engine.py
View file @
2bdea7ac
...
@@ -300,7 +300,7 @@ class LLMEngine:
...
@@ -300,7 +300,7 @@ class LLMEngine:
continue
continue
# Check if the sequence has reached max_seq_len.
# Check if the sequence has reached max_seq_len.
if
(
seq
.
get_len
()
>
=
if
(
seq
.
get_len
()
>
self
.
scheduler
.
scheduler_config
.
max_seq_len
):
self
.
scheduler
.
scheduler_config
.
max_seq_len
):
self
.
scheduler
.
free_seq
(
self
.
scheduler
.
free_seq
(
seq
,
SequenceStatus
.
FINISHED_LENGTH_CAPPED
)
seq
,
SequenceStatus
.
FINISHED_LENGTH_CAPPED
)
...
...
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