Skip to content

Commit a6e9161

Browse files
authored
fix bug. (#2718)
1 parent 90ef28d commit a6e9161

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fastdeploy/input/ernie_tokenizer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def spec_init(self):
143143

144144
def convert_tokens_to_string(self, tokens):
145145
"""Converts a sequence of tokens (string) in a single string."""
146-
spec_init()
146+
self.spec_init()
147147
current_sub_tokens = []
148148
out_string = ""
149149
# prev_is_special = False
@@ -216,7 +216,7 @@ def tokenize(self, text: TextInput, **kwargs) -> List[str]:
216216
# if isinstance(t, AddedToken)
217217
# )
218218

219-
spec_init()
219+
self.spec_init()
220220
text, kwargs = self.prepare_for_tokenization(text, **kwargs)
221221

222222
# TODO: should this be in the base class?

0 commit comments

Comments
 (0)