From 73ae0b44e96caa66e8b5d46badece2a3186ce304 Mon Sep 17 00:00:00 2001 From: Yuchen Yan <50619811+yanyc428@users.noreply.github.com> Date: Sun, 9 Mar 2025 12:14:53 +0800 Subject: [PATCH] [Bugfix] Fix tqdm progress bar when SamplingParams.n > 1 (#12428) Signed-off-by: Yuchen Yan <740987012@qq.com> --- vllm/entrypoints/llm.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vllm/entrypoints/llm.py b/vllm/entrypoints/llm.py index 6eb838fa02..6c2e87416b 100644 --- a/vllm/entrypoints/llm.py +++ b/vllm/entrypoints/llm.py @@ -1394,7 +1394,9 @@ class LLM: pbar.postfix = ( f"est. speed input: {in_spd:.2f} toks/s, " f"output: {out_spd:.2f} toks/s") - pbar.update(1) + pbar.update(len(output.outputs)) + else: + pbar.update(1) if use_tqdm: pbar.close()