Unverified Commit 2bdea7ac authored by Zhuohan Li's avatar Zhuohan Li Committed by GitHub
Browse files

[Fix] Fix the condition of max_seq_len (#477)

parent 58df2883
......@@ -190,7 +190,7 @@ class Scheduler:
break
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(
f"Input prompt ({num_prompt_tokens} tokens) is too long"
" and exceeds limit of "
......
......@@ -300,7 +300,7 @@ class LLMEngine:
continue
# 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.free_seq(
seq, SequenceStatus.FINISHED_LENGTH_CAPPED)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment