Skip to content

[CB] Add warmup feature#45112

Open
remi-or wants to merge 16 commits intomainfrom
cb-warmup
Open

[CB] Add warmup feature#45112
remi-or wants to merge 16 commits intomainfrom
cb-warmup

Conversation

@remi-or
Copy link
Copy Markdown
Collaborator

@remi-or remi-or commented Mar 30, 2026

This PR adds a warmup phase before generation starts, turned on by default.
It allows for better diagnostics and a more representative user experience than without warmup, where the cost of wamup is payed during the first request rather than in a phase before generation starts.
Warmup is skipped if cuda graphs and compile are both turned off.

@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 requested a review from ArthurZucker March 30, 2026 11:22
Copy link
Copy Markdown
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

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

SGTM

)
if warmup:
# Warmup is long (~30 sec): best to signal the user it's happening than let them think the manager is stuck
print("Warming up for coninuous batching...")
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.

logger pleaes

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

With what severity? Warning? Info wont show up on normal user terminal :/

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.

Yeah warninng sounds good

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

done

@remi-or remi-or enabled auto-merge March 30, 2026 15:35
@remi-or remi-or disabled auto-merge March 30, 2026 15:56
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.

3 participants