Ignore detokenization error
This commit is contained in:
@@ -56,7 +56,7 @@ class DetokenizerManager:
|
|||||||
int(output_tokens[i][0])
|
int(output_tokens[i][0])
|
||||||
)
|
)
|
||||||
if not isinstance(first_token, str):
|
if not isinstance(first_token, str):
|
||||||
first_token = first_token.decode("utf-8")
|
first_token = first_token.decode("utf-8", errors="ignore")
|
||||||
if first_token.startswith("▁"):
|
if first_token.startswith("▁"):
|
||||||
output_strs[i] = " " + output_strs[i]
|
output_strs[i] = " " + output_strs[i]
|
||||||
|
|
||||||
|
|||||||
@@ -320,7 +320,7 @@ def launch_server(server_args, pipe_finish_writer):
|
|||||||
|
|
||||||
# Load chat template if needed
|
# Load chat template if needed
|
||||||
if server_args.chat_template is not None:
|
if server_args.chat_template is not None:
|
||||||
print(server_args.chat_template)
|
print(f"Use chat template: {server_args.chat_template}")
|
||||||
if not chat_template_exists(server_args.chat_template):
|
if not chat_template_exists(server_args.chat_template):
|
||||||
if not os.path.exists(server_args.chat_template):
|
if not os.path.exists(server_args.chat_template):
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
|
|||||||
Reference in New Issue
Block a user