Set default padding_multiple to 32 in DPTrainer#291
Open
copybara-service[bot] wants to merge 1 commit into
Open
Set default padding_multiple to 32 in DPTrainer#291copybara-service[bot] wants to merge 1 commit into
copybara-service[bot] wants to merge 1 commit into
Conversation
Poisson batch selection yields variable-length batches. On GPU/TPU, each unique batch size triggers a separate XLA compilation, and each compiled program (CUBIN) can be ~1 GB. With padding_multiple=1 (previous default), compiled programs accumulate and eventually OOM. Setting padding_multiple=32 means at most ceil(max_batch_size/32) unique compiled programs, providing a good balance between wasted padding examples and recompilation. This is purely a performance change — padding examples are masked via is_padding_example and do not affect correctness or privacy. PiperOrigin-RevId: 937404130
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Set default padding_multiple to 32 in DPTrainer
Poisson batch selection yields variable-length batches. On GPU/TPU, each
unique batch size triggers a separate XLA compilation, and each compiled
program (CUBIN) can be ~1 GB. With padding_multiple=1 (previous default),
compiled programs accumulate and eventually OOM.
Setting padding_multiple=32 means at most ceil(max_batch_size/32) unique
compiled programs, providing a good balance between wasted padding
examples and recompilation. This is purely a performance change — padding
examples are masked via is_padding_example and do not affect correctness
or privacy.