-
-
Notifications
You must be signed in to change notification settings - Fork 3
Set HuggingFaceNmtEngine to not truncate by default #45
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ddaspit)
machine/jobs/huggingface/hugging_face_nmt_model_factory.py
line 74 at r1 (raw file):
num_beams=self._config.huggingface.generate_params.num_beams, batch_size=self._config.huggingface.generate_params.batch_size, truncation=TruncationStrategy.LONGEST_FIRST,
Wouldn't this cause memory issues with the odd super-long segment of 2000 tokens? Why the need for the change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @johnml1135)
machine/jobs/huggingface/hugging_face_nmt_model_factory.py
line 74 at r1 (raw file):
Previously, johnml1135 (John Lambert) wrote…
Wouldn't this cause memory issues with the odd super-long segment of 2000 tokens? Why the need for the change?
This doesn't change the behavior for Serval at all. It simply changes the default truncation strategy for the HuggingFaceNmtEngine
back to not truncate. Serval jobs still use the longest first truncation strategy. We are just now setting it in the HuggingFaceNmtModelFactory
, which is the more appropriate place.
Previously, ddaspit (Damien Daspit) wrote…
ok. |
It looks like the tokenizer code is not mixed with this pull request. |
4a4fa4d
to
167f3e9
Compare
167f3e9
to
4023940
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
📢 Thoughts on this report? Let us know!. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 10 files reviewed, all discussions resolved
This change is