Update tokenizer.py
Browse files- tokenizer.py +2 -1
tokenizer.py
CHANGED
|
@@ -6,7 +6,8 @@ class ModernDecoderBERTTokenizer(PreTrainedTokenizerFast):
|
|
| 6 |
|
| 7 |
def _batch_encode_plus(self, *args, **kwargs):
|
| 8 |
outputs = super()._batch_encode_plus(*args, **kwargs)
|
| 9 |
-
|
|
|
|
| 10 |
|
| 11 |
# Get the input_ids to check for EOS tokens
|
| 12 |
input_ids = outputs['input_ids']
|
|
|
|
| 6 |
|
| 7 |
def _batch_encode_plus(self, *args, **kwargs):
|
| 8 |
outputs = super()._batch_encode_plus(*args, **kwargs)
|
| 9 |
+
if "token_type_ids" in output:
|
| 10 |
+
del outputs["token_type_ids"]
|
| 11 |
|
| 12 |
# Get the input_ids to check for EOS tokens
|
| 13 |
input_ids = outputs['input_ids']
|