Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9677a1f

Browse filesBrowse files
committed
fix: Check order
1 parent 4d6b2f7 commit 9677a1f
Copy full SHA for 9677a1f

File tree

Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed

‎llama_cpp/llama.py

Copy file name to clipboardExpand all lines: llama_cpp/llama.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,15 +205,15 @@ def __init__(
205205

206206
for i, (k, v) in enumerate(kv_overrides.items()):
207207
self._kv_overrides_array[i].key = k.encode("utf-8")
208-
if isinstance(v, int):
208+
if isinstance(v, bool):
209+
self._kv_overrides_array[i].tag = llama_cpp.LLAMA_KV_OVERRIDE_BOOL
210+
self._kv_overrides_array[i].value.bool_value = v
211+
elif isinstance(v, int):
209212
self._kv_overrides_array[i].tag = llama_cpp.LLAMA_KV_OVERRIDE_INT
210213
self._kv_overrides_array[i].value.int_value = v
211214
elif isinstance(v, float):
212215
self._kv_overrides_array[i].tag = llama_cpp.LLAMA_KV_OVERRIDE_FLOAT
213216
self._kv_overrides_array[i].value.float_value = v
214-
elif isinstance(v, bool):
215-
self._kv_overrides_array[i].tag = llama_cpp.LLAMA_KV_OVERRIDE_BOOL
216-
self._kv_overrides_array[i].value.bool_value = v
217217
else:
218218
raise ValueError(f"Unknown value type for {k}: {v}")
219219

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.