Suppport qwen model and solve some problems (#75)

This commit is contained in:
Arcmoon
2024-01-23 12:14:51 +08:00
committed by GitHub
parent e08bca2840
commit 63e97e5e4c
7 changed files with 274 additions and 4 deletions

View File

@@ -55,6 +55,7 @@ class DetokenizerManager:
first_token = self.tokenizer.convert_ids_to_tokens(
int(output_tokens[i][0])
)
first_token = first_token.decode("utf-8")
if first_token.startswith(""):
output_strs[i] = " " + output_strs[i]