-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* add wrapper to apply truncation strategy * update interface to require keyword arg for s2 (w/ PEP 3102) * update tests to call boundary_token_fn w/ new req kwarg * update calls to boundary_token_fn to include req. s2 kwarg * update apply_standard_boundary_tokens to require keyword arg for s2 (w/ PEP 3102) * get max model input sizes from models, config to truncate to min of max model input size and max_seq_len * update trunc strategy to allow left- or right-trunc * add model processing interface trunc tests * raise exception if truncation is needed but strategy is unspecified. * expect ValueError with unspecified trunc strat in test * update _apply_boundary_tokens_with_trunc_strategy docstring * simplify/reduce logging during truncation * add option to trunc both s1 and s2 evenly * add test for trunc both s1 and s2 evenly * add reasonable truncation args for most tasks
- Loading branch information
Showing
8 changed files
with
428 additions
and
61 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.