Skip to content

Commit

Permalink
decode fix
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyaGusev committed May 16, 2023
1 parent 15c9889 commit 5b31a0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion self_instruct/src/interact_llamacpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def interact(
repeat_penalty=repeat_penalty
)
for token in generator:
token_str = model.detokenize([token]).decode("utf-8")
token_str = model.detokenize([token]).decode("utf-8", errors="ignore")
tokens.append(token)
if token == model.token_eos():
break
Expand Down

0 comments on commit 5b31a0b

Please sign in to comment.