Tokenization improvements
This commit is contained in:
parent
cd08eb0753
commit
ad8ac545a5
5 changed files with 19 additions and 15 deletions
|
@ -98,8 +98,8 @@ class LlamaCppModel:
|
|||
|
||||
return self.model.tokenize(string)
|
||||
|
||||
def decode(self, tokens):
|
||||
return self.model.detokenize(tokens)
|
||||
def decode(self, ids):
|
||||
return self.model.detokenize(ids).decode('utf-8')
|
||||
|
||||
def get_logits(self, tokens):
|
||||
self.model.eval(tokens)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue