[Mypy] Part 3 fix typing for nested directories for most of directory (#4161)

This commit is contained in:
SangBin Cho
2024-04-22 21:32:44 -07:00
committed by GitHub
parent 34128a697e
commit 0ae11f78ab
29 changed files with 126 additions and 88 deletions
@@ -114,9 +114,9 @@ class BaichuanTokenizer(PreTrainedTokenizer):
token = self.sp_model.IdToPiece(index)
return token
def convert_tokens_to_string(self, tokens):
def convert_tokens_to_string(self, tokens: List[str]):
"""Converts a sequence of tokens (string) in a single string."""
current_sub_tokens = []
current_sub_tokens: List[str] = []
out_string = ""
prev_is_special = False
for i, token in enumerate(tokens):