mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-23 00:18:20 +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)
|
return self.model.tokenize(string)
|
||||||
|
|
||||||
def decode(self, ids, **kwargs):
|
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):
|
def get_logits(self, tokens):
|
||||||
self.model.reset()
|
self.model.reset()
|
||||||
|
Loading…
Reference in New Issue
Block a user