Skip to content

fix: propagate the verbose to the Prefill tqdm#1015

Open
PeterStaar-IBM wants to merge 1 commit intoBlaizzy:mainfrom
PeterStaar-IBM:fix/align-tqdm-to-verbose
Open

fix: propagate the verbose to the Prefill tqdm#1015
PeterStaar-IBM wants to merge 1 commit intoBlaizzy:mainfrom
PeterStaar-IBM:fix/align-tqdm-to-verbose

Conversation

@PeterStaar-IBM
Copy link
Copy Markdown

  1. generate_step signature (line 397): Added verbose: bool = False parameter before **kwargs.
  2. Prefill tqdm (line 533): Added disable=not verbose to suppress the bar when verbose=False.
  3. stream_generate (line 604): Added verbose = kwargs.pop(verbose, False) to extract verbose from kwargs before it reaches generate_step.
  4. generate_step call in stream_generate (line 733): Added verbose=verbose to forward it explicitly.
  5. generate → stream_generate call (line 858): Added verbose=verbose so the top-level generate() function's verbose flag also controls the Prefill bar.

  1. generate_step signature (line 397): Added verbose: bool = False parameter before **kwargs.
  2. Prefill tqdm (line 533): Added disable=not verbose to suppress the bar when verbose=False.
  3. stream_generate (line 604): Added verbose = kwargs.pop(verbose, False) to extract verbose from kwargs before
  it reaches generate_step.
  4. generate_step call in stream_generate (line 733): Added verbose=verbose to forward it explicitly.
  5. generate → stream_generate call (line 858): Added verbose=verbose so the top-level generate() function's verbose
   flag also controls the Prefill bar.

Signed-off-by: Peter Staar <taa@zurich.ibm.com>
@PeterStaar-IBM
Copy link
Copy Markdown
Author

@Blaizzy Let me know if we can pull this in and release. We are a big fan of mlx-vlm in Docling (https://github.com/docling-project/docling), but we are currently seeing a lot of log pollution due to the Prefill tqdm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant