Make llamacpp_HF 6x faster
This commit is contained in:
parent
385229313f
commit
b53ed70a70
2 changed files with 2 additions and 2 deletions
|
@ -56,7 +56,7 @@ class LlamacppHF(PreTrainedModel):
|
|||
else:
|
||||
self.model.eval([seq[-1]])
|
||||
|
||||
logits = torch.tensor(self.model.eval_logits[-1]).view(1, 1, -1).to(kwargs['input_ids'].device)
|
||||
logits = torch.tensor(self.model.scores[self.model.n_tokens-1, :]).view(1, 1, -1).to(kwargs['input_ids'].device)
|
||||
else:
|
||||
self.model.reset()
|
||||
self.model.eval(seq)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue