Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reimplement fixed size batching #69

Merged
merged 2 commits into from
May 20, 2024
Merged

Conversation

Waino
Copy link
Collaborator

@Waino Waino commented May 20, 2024

Fixed size batching entails using

  • "batch_type: sents" to fix the batch dimension to batch_size, and
  • "pad_to_max_length: true" together with "max_length" to fix the sequence length dimension.

This feature was first implemented in #55 on top of the spiral LookAheadBucketing, which was removed in #66. Here it has been reimplemented as a standalone component.

Closes #67

Fixed size batching entails using
- "batch_type: sents" to fix the batch dimension to batch_size, and
- "pad_to_max_length: true" together with "max_length" to fix the
  sequence length dimension.

Closes #67
@Waino Waino requested a review from TimotheeMickus May 20, 2024 13:31
Copy link
Collaborator

@TimotheeMickus TimotheeMickus left a comment

Choose a reason for hiding this comment

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

LGTM. missing a help message for pad_to_max_length (will propagate to the docs)

mammoth/opts.py Outdated Show resolved Hide resolved
mammoth/modules/layer_stack_encoder.py Show resolved Hide resolved
@Waino Waino merged commit c6995b7 into main May 20, 2024
2 checks passed
@Waino Waino deleted the feat/reimplement-fixed-batching branch May 20, 2024 15:22
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.

reimplement sentence based max len padding
2 participants