oweller2
commited on
Commit
•
970954b
1
Parent(s):
6d20d8a
update
Browse files- tokenizer.py +4 -0
tokenizer.py
CHANGED
@@ -5,3 +5,7 @@ class ModernDecoderBERTTokenizer(PreTrainedTokenizerFast):
|
|
5 |
if token_ids_1 is None:
|
6 |
return [id for id in token_ids_0 if id != self.eos_token_id]
|
7 |
return [id for id in token_ids_0 if id != self.eos_token_id] + [id for id in token_ids_1 if id != self.eos_token_id]
|
|
|
|
|
|
|
|
|
|
5 |
if token_ids_1 is None:
|
6 |
return [id for id in token_ids_0 if id != self.eos_token_id]
|
7 |
return [id for id in token_ids_0 if id != self.eos_token_id] + [id for id in token_ids_1 if id != self.eos_token_id]
|
8 |
+
|
9 |
+
# Register the class
|
10 |
+
from transformers import AutoTokenizer
|
11 |
+
AutoTokenizer.register(ModernDecoderBERTTokenizer)
|