mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-22 16:17:57 +01:00
Added UnicodeDecodeError workaround for modules/llamacpp_model.py
This commit is contained in:
parent
8aaa0a6f4e
commit
39db799bf1
@ -114,7 +114,7 @@ class LlamaCppModel:
|
||||
return self.model.tokenize(string)
|
||||
|
||||
def decode(self, ids, **kwargs):
|
||||
return self.model.detokenize(ids).decode('utf-8')
|
||||
return self.model.detokenize(ids).decode('utf-8', 'replace')
|
||||
|
||||
def get_logits(self, tokens):
|
||||
self.model.reset()
|
||||
|
Loading…
Reference in New Issue
Block a user