From a27445358af50d7934a12ad404318ff058290515 Mon Sep 17 00:00:00 2001 From: Yuchen Yan <740987012@qq.com> Date: Sun, 26 Jan 2025 01:48:48 +0800 Subject: [PATCH] [Bugfix] Fix tqdm progress bar when SamplingParams.n > 1 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 1860ed3d7db5..da6c3aee1338 100644 --- a/vllm/entrypoints/llm.py +++ b/vllm/entrypoints/llm.py @@ -1330,7 +1330,9 @@ def _run_engine( 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()