Skip to content

Commit

Permalink
[Tokenizer] Fix TokenizerFast missing clean_up_tokenization_spaces (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
dynamicheart authored Oct 23, 2024
1 parent a564483 commit 0102f31
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions paddlenlp/transformers/tokenizer_utils_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1371,6 +1371,9 @@ def __init__(self, **kwargs):

self.model_input_names = kwargs.pop("model_input_names", self.model_input_names)

# By default, cleaning tokenization spaces for both fast and slow tokenizers
self.clean_up_tokenization_spaces = kwargs.pop("clean_up_tokenization_spaces", False)

# By default, do not split special tokens for both fast and slow tokenizers
self.split_special_tokens = kwargs.pop("split_special_tokens", False)

Expand Down

0 comments on commit 0102f31

Please # to comment.