We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 996e31d commit cc706fbCopy full SHA for cc706fb
llama_cpp/llama.py
@@ -133,15 +133,18 @@ def __init__(
133
134
self.n_threads = n_threads or max(multiprocessing.cpu_count() // 2, 1)
135
136
+ self.lora_base = lora_base
137
+ self.lora_path = lora_path
138
+
139
if not os.path.exists(model_path):
140
raise ValueError(f"Model path does not exist: {model_path}")
141
142
self.ctx = llama_cpp.llama_init_from_file(
143
self.model_path.encode("utf-8"), self.params
144
)
145
- self.lora_base = lora_base
- self.lora_path = lora_path
146
+ assert self.ctx is not None
147
148
if self.lora_path:
149
if llama_cpp.llama_apply_lora_from_file(
150
self.ctx,
0 commit comments