Skip to content

Commit 4e11888

Browse files
Update llm.py based on Code Review
1 parent 8046dbe commit 4e11888

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

vllm/entrypoints/llm.py

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -604,18 +604,13 @@ def create_tokens_prompt_from_beam(
604604
**mm_kwargs,
605605
), )
606606

607-
token_iter = range(max_tokens)
608-
if use_tqdm:
609-
token_iter = tqdm(range(max_tokens, desc="Beam Searching"))
610-
warnings.warn(
611-
"The progress bar shows the upper bound on token steps and "
612-
"may finish early due to stopping conditions. It does not "
613-
"reflect instance-level progress.",
614-
stacklevel=2,
615-
unit="token",
616-
unit_scale=False,
617-
)
618-
607+
token_iter = tqdm(range(max_tokens), desc="Beam search", unit="token", unit_scale=False)
608+
warnings.warn(
609+
"The progress bar shows the upper bound on token steps and "
610+
"may finish early due to stopping conditions. It does not "
611+
"reflect instance-level progress.",
612+
stacklevel=2,
613+
)
619614
for _ in token_iter:
620615
all_beams: list[BeamSearchSequence] = list(
621616
sum((instance.beams for instance in instances), []))

0 commit comments

Comments
 (0)