Skip to content

Commit fafe471

Browse files
committed
Update llama.cpp
1 parent 8f49ca0 commit fafe471

File tree

3 files changed

+186
-44
lines changed

3 files changed

+186
-44
lines changed

llama_cpp/llama.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ def __init__(
127127

128128
self.params = llama_cpp.llama_context_default_params()
129129
self.params.n_ctx = n_ctx
130-
self.params.n_parts = n_parts
131130
self.params.n_gpu_layers = n_gpu_layers
132131
self.params.seed = seed
133132
self.params.f16_kv = f16_kv
@@ -149,6 +148,10 @@ def __init__(
149148
self.lora_base = lora_base
150149
self.lora_path = lora_path
151150

151+
### DEPRECATED ###
152+
self.n_parts = n_parts
153+
### DEPRECATED ###
154+
152155
if not os.path.exists(model_path):
153156
raise ValueError(f"Model path does not exist: {model_path}")
154157

@@ -1225,7 +1228,6 @@ def __getstate__(self):
12251228
verbose=self.verbose,
12261229
model_path=self.model_path,
12271230
n_ctx=self.params.n_ctx,
1228-
n_parts=self.params.n_parts,
12291231
n_gpu_layers=self.params.n_gpu_layers,
12301232
seed=self.params.seed,
12311233
f16_kv=self.params.f16_kv,
@@ -1239,6 +1241,9 @@ def __getstate__(self):
12391241
n_threads=self.n_threads,
12401242
lora_base=self.lora_base,
12411243
lora_path=self.lora_path,
1244+
### DEPRECATED ###
1245+
n_parts=self.n_parts,
1246+
### DEPRECATED ###
12421247
)
12431248

12441249
def __setstate__(self, state):

0 commit comments

Comments
 (0)