zR
commited on
Commit
•
76f71fd
1
Parent(s):
b97dd95
fix with convert_tokens_to_string
Browse files- tokenization_chatglm.py +0 -7
tokenization_chatglm.py
CHANGED
@@ -90,13 +90,6 @@ class ChatGLM4Tokenizer(PreTrainedTokenizer):
|
|
90 |
tokens.append(self.decoder[t])
|
91 |
return tokens
|
92 |
|
93 |
-
def _tokenize(self, text, **kwargs):
|
94 |
-
tokens = []
|
95 |
-
ids = self.tokenizer.encode(text)
|
96 |
-
for t in ids:
|
97 |
-
tokens.append(self.decoder[t])
|
98 |
-
return tokens
|
99 |
-
|
100 |
def _convert_token_to_id(self, token):
|
101 |
""" Converts a token (str) in an id using the vocab. """
|
102 |
return self.mergeable_ranks[token]
|
|
|
90 |
tokens.append(self.decoder[t])
|
91 |
return tokens
|
92 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
def _convert_token_to_id(self, token):
|
94 |
""" Converts a token (str) in an id using the vocab. """
|
95 |
return self.mergeable_ranks[token]
|