BathSalt-1 commited on
Commit
0f624aa
·
verified ·
1 Parent(s): 73384c6

Create tokenizer.py

Browse files
Files changed (1) hide show
  1. tokenizer.py +11 -0
tokenizer.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+ from transformers import AutoTokenizer
3
+
4
+ class BathSalt1DaedalusPhi3Tokenizer(AutoTokenizer):
5
+ def __init__(self, config):
6
+ super().__init__(config)
7
+ self.config = config
8
+
9
+ def encode(self, text, return_tensors="pt"):
10
+ encoding = super().encode(text, return_tensors=return_tensors)
11
+ return encoding