Skip to content

Quiet continuous batching at default verbosity - #48314

Merged
remi-or merged 4 commits into
mainfrom
fix-cb-default-verbosity
Aug 27, 2026
Merged

remi-or merged 4 commits into
mainfrom
fix-cb-default-verbosity

Conversation

@qgallouedec

@qgallouedec qgallouedec commented Aug 25, 2026 •

Copy link
Copy Markdown
Member

CPU CI GPU run-slow

What does this PR do?

Fixes #48313. Part of #48294.

Changes:

  • The status messages (attention auto-switch, warmup start/finish, progress-bar note) move from warning to info.
  • The Solving n requests progress bar becomes opt-in (progress_bar=False by default): like generate, generate_batch prints nothing at default verbosity.
  • Actionable warnings stay at warning: unset eos_token_id, warmup failure, requests dropped during shutdown.

Validation: the issue's repro prints only the eos_token_id warning after this change (the repro's GenerationConfig genuinely lacks one; the remaining [transformers] You do not have flash_attn installed... line comes from the kernels integration, out of this PR's scope)

Who can review?

@remi-or (continuous batching)

A plain generate_batch printed five WARNING lines (attention auto-switch, warmup start/finish,
progress-bar note) and a progress bar; generate prints nothing. Status messages move to info,
and the progress bar is opt-in. Actionable warnings (unset eos_token_id, warmup failure, dropped
requests) stay at warning.
@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@remi-or remi-or left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some nits but otherwise we are good! Thanks for the improvement

if version is not None:
target_implem = f"flash_attention_{version}" # no "paged|" prefix here to enter the branch below
logger.warning(
logger.info(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is better as a warning, because a user initializing with sdpa should k now we change the implementation from under them.

@@ -1183,10 +1183,10 @@ def continuous_batching_context_manager(
)
if warmup and not manager.warmed_up:
# Warmup is long (~30 sec): best to signal the user it's happening than let them think the manager is stuck

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Warmup is long (~30 sec): best to signal the user it's happening than let them think the manager is stuck
# TODO: have a progress bar for the warmup as well, like other inference engine

because I agree this might be a bit too verbose but we still need some visibility for the users who want some

@remi-or remi-or left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some nits but otherwise we are good! Thanks for the improvement

@qgallouedec

Copy link
Copy Markdown
Member Author

Thanks! Applied both in 88e0773.

The two CI failures are unrelated

I'll let you merge this one when you think it's ready

@github-actions

Copy link
Copy Markdown
Contributor

CI recap

Dashboard: View test results in Grafana
Latest run: 33033759397:1
Result: success | Jobs: 16 | Tests: 181,410 | Failures: 0 | Duration: 14h 30m

@remi-or
remi-or added this pull request to the merge queue Aug 27, 2026
Merged via the queue into main with commit 2e7033e Aug 27, 2026
112 checks passed
@remi-or
remi-or deleted the fix-cb-default-verbosity branch August 27, 2026 07:57
qgallouedec added a commit that referenced this pull request Aug 29, 2026
#48314 downgraded the neighbouring 'consider using a flash attn_implementation' line to info and
deliberately left this one alone: it reports that the model's attention implementation is being
switched, which is a side effect worth surfacing. This branch was still overriding that.
sbucaille pushed a commit to sbucaille/transformers that referenced this pull request Sep 16, 2026
* Quiet continuous batching at default verbosity

A plain generate_batch printed five WARNING lines (attention auto-switch, warmup start/finish,
progress-bar note) and a progress bar; generate prints nothing. Status messages move to info,
and the progress bar is opt-in. Actionable warnings (unset eos_token_id, warmup failure, dropped
requests) stay at warning.

* Apply suggestion from @qgallouedec

* Apply review: keep the attn switch a warning, TODO for the warmup progress bar
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.

Continuous batching is loud by default: WARNING logs and progress bars on a plain generate_batch

3 participants