orionweller commited on
Commit
3901bef
·
verified ·
1 Parent(s): 8e5d4e2

Update tokenizer.py

Browse files
Files changed (1) hide show
  1. 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
- del outputs["token_type_ids"]
 
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']