[Bugfix][Core] Prevent token lengths exceeding max_model_len in V0 (#19348)

Signed-off-by: 22quinn <33176974+22quinn@users.noreply.github.com>
This commit is contained in:
22quinn
2025-06-09 23:01:29 +08:00
committed by GitHub
parent 5cf2daea9a
commit c1c7dbbeeb
2 changed files with 23 additions and 1 deletions
+1 -1
View File
@@ -82,7 +82,7 @@ class StopChecker:
return
# Check if the sequence has reached max_model_len.
if seq.get_len() > self._get_max_model_len(lora_req):
if seq.get_len() >= self._get_max_model_len(lora_req):
seq.status = SequenceStatus.FINISHED_LENGTH_CAPPED
return