Skip to content

🧹 Remove max_batch_tokens, num_blocks and block_size from generation kwargs#4065

Merged
qgallouedec merged 7 commits into
mainfrom
remove-kward-paged-attention
Sep 23, 2025
Merged

🧹 Remove max_batch_tokens, num_blocks and block_size from generation kwargs#4065
qgallouedec merged 7 commits into
mainfrom
remove-kward-paged-attention

Conversation

@qgallouedec

Copy link
Copy Markdown
Member

These parameters are now automatically computed, see huggingface/transformers#40426

@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 commented Sep 11, 2025

Copy link
Copy Markdown
Collaborator

As a reminder, while max_batch_tokens and num_blocks are infered, block_size isn't and defaults to 32. You might want to test out how the change from 128 to 32 will impact you 🙂
Not really familiar with trl so I can't really review this, sorry!

@qgallouedec

Copy link
Copy Markdown
Member Author

thanks for the feedback @remi-or!

change from 128 to 32 will impact you 🙂

will do!

@albertvillanova albertvillanova left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM if the test of the change in block_size does not have a negative impact. Otherwise, we should keep the original 128 value.

@qgallouedec

Copy link
Copy Markdown
Member Author

Tried with 0.5B and 1.7B, no difference between block_size=32 and 128👍

@qgallouedec qgallouedec merged commit deac14a into main Sep 23, 2025
10 of 12 checks passed
@qgallouedec qgallouedec deleted the remove-kward-paged-attention branch September 23, 2025 14:50
qgallouedec added a commit that referenced this pull request Sep 23, 2025
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.

6 participants