From 7625c6de892a2614ad2d2a8486eea224b2ce3dbd Mon Sep 17 00:00:00 2001 From: EugeoSynthesisThirtyTwo Date: Tue, 20 Jun 2023 21:18:42 +0200 Subject: [PATCH] fix usage of self in classmethod (#2781) --- modules/llamacpp_model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/llamacpp_model.py b/modules/llamacpp_model.py index 9f6122d9..10a852db 100644 --- a/modules/llamacpp_model.py +++ b/modules/llamacpp_model.py @@ -52,9 +52,9 @@ class LlamaCppModel: 'n_gpu_layers': shared.args.n_gpu_layers } - self.model = Llama(**params) + result.model = Llama(**params) if cache_capacity > 0: - self.model.set_cache(LlamaCache(capacity_bytes=cache_capacity)) + result.model.set_cache(LlamaCache(capacity_bytes=cache_capacity)) # This is ugly, but the model and the tokenizer are the same object in this library. return result, result