A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 15, 06:00 UTC
Fix test_max_model_len in tests/entrypoints/llm/test_generate.py (#19451)
Signed-off-by: Lu Fang <lufang@fb.com>
Lu Fang committed
Jun 11, 2025 at 12:54 UTC
2b1e2111b025d5f832d62167afab8756deaec22d
1 file changed
+4
-1
tests/entrypoints/llm/test_generate.py
+4
-1
@@ -125,4 +125,7 @@ def test_max_model_len():
125
for output in outputs:
126
num_total_tokens = len(output.prompt_token_ids) + len(
127
output.outputs[0].token_ids)
128
- assert num_total_tokens == max_model_len
128
+ # Total tokens must not exceed max_model_len.
129
+ # It can be less if generation finishes due to other reasons (e.g., EOS)
130
+ # before reaching the absolute model length limit.
131
+ assert num_total_tokens <= max_model_len