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
2b1e2111
Unverified
Commit
2b1e2111
authored
Jun 11, 2025
by
Lu Fang
Committed by
GitHub
Jun 11, 2025
Browse files
Fix test_max_model_len in tests/entrypoints/llm/test_generate.py (#19451)
Signed-off-by:
Lu Fang
<
lufang@fb.com
>
parent
a45b979d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
tests/entrypoints/llm/test_generate.py
tests/entrypoints/llm/test_generate.py
+4
-1
No files found.
tests/entrypoints/llm/test_generate.py
View file @
2b1e2111
...
@@ -125,4 +125,7 @@ def test_max_model_len():
...
@@ -125,4 +125,7 @@ def test_max_model_len():
for
output
in
outputs
:
for
output
in
outputs
:
num_total_tokens
=
len
(
output
.
prompt_token_ids
)
+
len
(
num_total_tokens
=
len
(
output
.
prompt_token_ids
)
+
len
(
output
.
outputs
[
0
].
token_ids
)
output
.
outputs
[
0
].
token_ids
)
assert
num_total_tokens
==
max_model_len
# Total tokens must not exceed max_model_len.
# It can be less if generation finishes due to other reasons (e.g., EOS)
# before reaching the absolute model length limit.
assert
num_total_tokens
<=
max_model_len
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