mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-12-25 22:08:53 +01:00
Llamacpp_HF: Fix CFG cache init (#4219)
Documentation says that model.context_params should be sent when a new context is created. The current code uses model.params which doesn't exist. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
parent
2a7cb346dd
commit
7743b5e9de
@ -48,7 +48,7 @@ class LlamacppHF(PreTrainedModel):
|
||||
'n_tokens': self.model.n_tokens,
|
||||
'input_ids': self.model.input_ids.copy(),
|
||||
'scores': self.model.scores.copy(),
|
||||
'ctx': llama_cpp_lib().llama_new_context_with_model(model.model, model.params)
|
||||
'ctx': llama_cpp_lib().llama_new_context_with_model(model.model, model.context_params)
|
||||
}
|
||||
|
||||
def _validate_model_class(self):
|
||||
|
Loading…
Reference in New Issue
Block a user