fix usage of self in classmethod (#2781)

This commit is contained in:
EugeoSynthesisThirtyTwo 2023-06-20 21:18:42 +02:00 committed by GitHub
parent c40932eb39
commit 7625c6de89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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