Fix decode errors permanently

This commit is contained in:
Mug
2023-04-26 14:37:06 +02:00
parent 1b73a15e62
commit c4a8491d42
3 changed files with 13 additions and 10 deletions

View File

@@ -70,7 +70,7 @@ while remaining_tokens > 0:
if not input_noecho:
for id in embd:
print(
llama_cpp.llama_token_to_str(ctx, id).decode("utf-8"),
llama_cpp.llama_token_to_str(ctx, id).decode("utf-8", errors="ignore"),
end="",
flush=True,
)