mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-21 23:57:58 +01:00
Fix a bug in llama.cpp get_logits() function
This commit is contained in:
parent
000b77a17d
commit
092a2c3516
@ -105,6 +105,7 @@ class LlamaCppModel:
|
||||
return self.model.detokenize(ids).decode('utf-8')
|
||||
|
||||
def get_logits(self, tokens):
|
||||
self.model.reset()
|
||||
self.model.eval(tokens)
|
||||
logits = self.model._scores
|
||||
logits = np.expand_dims(logits, 0) # batch dim is expected
|
||||
|
Loading…
Reference in New Issue
Block a user