Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7a09a54162 |
@@ -1697,6 +1697,13 @@ class PreTrainedTokenizerFast(PreTrainedTokenizer):
|
|||||||
return_offsets_mapping=False,
|
return_offsets_mapping=False,
|
||||||
**kwargs
|
**kwargs
|
||||||
):
|
):
|
||||||
|
if not add_special_tokens:
|
||||||
|
logger.warning(
|
||||||
|
"Fast tokenizers add special tokens by default. To remove special tokens, please specify"
|
||||||
|
"`add_special_tokens=False` during the initialisation rather than when calling `encode`,"
|
||||||
|
"`encode_plus` or `batch_encode_plus`."
|
||||||
|
)
|
||||||
|
|
||||||
# Needed if we have to return a tensor
|
# Needed if we have to return a tensor
|
||||||
pad_to_max_length = pad_to_max_length or (return_tensors is not None)
|
pad_to_max_length = pad_to_max_length or (return_tensors is not None)
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user