Bump llama-cpp-python to 0.2.14
This commit is contained in:
parent
3fc505dc0f
commit
5c3eb22ce6
9 changed files with 105 additions and 105 deletions
|
|
@ -39,7 +39,7 @@ class LlamacppHF(PreTrainedModel):
|
|||
'n_tokens': self.model.n_tokens,
|
||||
'input_ids': self.model.input_ids,
|
||||
'scores': self.model.scores,
|
||||
'ctx': self.model.ctx
|
||||
'ctx': self.model._ctx.ctx
|
||||
}
|
||||
|
||||
if shared.args.cfg_cache:
|
||||
|
|
@ -65,7 +65,7 @@ class LlamacppHF(PreTrainedModel):
|
|||
'n_tokens': self.model.n_tokens,
|
||||
'input_ids': self.model.input_ids,
|
||||
'scores': self.model.scores,
|
||||
'ctx': self.model.ctx
|
||||
'ctx': self.model._ctx.ctx
|
||||
})
|
||||
|
||||
def save_negative_cache(self):
|
||||
|
|
@ -73,20 +73,20 @@ class LlamacppHF(PreTrainedModel):
|
|||
'n_tokens': self.model.n_tokens,
|
||||
'input_ids': self.model.input_ids,
|
||||
'scores': self.model.scores,
|
||||
'ctx': self.model.ctx
|
||||
'ctx': self.model._ctx.ctx
|
||||
})
|
||||
|
||||
def load_cache(self):
|
||||
self.model.n_tokens = self.llamacpp_cache['n_tokens']
|
||||
self.model.input_ids = self.llamacpp_cache['input_ids']
|
||||
self.model.scores = self.llamacpp_cache['scores']
|
||||
self.model.ctx = self.llamacpp_cache['ctx']
|
||||
self.model._ctx.ctx = self.llamacpp_cache['ctx']
|
||||
|
||||
def load_negative_cache(self):
|
||||
self.model.n_tokens = self.llamacpp_cache_negative['n_tokens']
|
||||
self.model.input_ids = self.llamacpp_cache_negative['input_ids']
|
||||
self.model.scores = self.llamacpp_cache_negative['scores']
|
||||
self.model.ctx = self.llamacpp_cache_negative['ctx']
|
||||
self.model._ctx.ctx = self.llamacpp_cache_negative['ctx']
|
||||
|
||||
@property
|
||||
def device(self) -> torch.device:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue