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 c3c2623

Browse filesBrowse files
committed
Update llama.cpp
1 parent e636214 commit c3c2623
Copy full SHA for c3c2623

File tree

Expand file treeCollapse file tree

2 files changed

+13
-1
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+13
-1
lines changed

‎llama_cpp/llama_cpp.py

Copy file name to clipboardExpand all lines: llama_cpp/llama_cpp.py
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ class llama_context_params(Structure):
7777
c_bool,
7878
), # the llama_eval() call computes all logits, not just the last one
7979
("vocab_only", c_bool), # only load the vocabulary, no weights
80+
("use_mmap", c_bool), # use mmap if possible
8081
("use_mlock", c_bool), # force system to keep model in RAM
8182
("embedding", c_bool), # embedding mode only
8283
# called with a progress value between 0 and 1, pass NULL to disable
@@ -99,6 +100,17 @@ def llama_context_default_params() -> llama_context_params:
99100
_lib.llama_context_default_params.argtypes = []
100101
_lib.llama_context_default_params.restype = llama_context_params
101102

103+
def llama_mmap_supported() -> c_bool:
104+
return _lib.llama_mmap_supported()
105+
106+
_lib.llama_mmap_supported.argtypes = []
107+
_lib.llama_mmap_supported.restype = c_bool
108+
109+
def llama_mlock_supported() -> c_bool:
110+
return _lib.llama_mlock_supported()
111+
112+
_lib.llama_mlock_supported.argtypes = []
113+
_lib.llama_mlock_supported.restype = c_bool
102114

103115
# Various functions for loading a ggml llama model.
104116
# Allocate (almost) all memory needed for the model.

‎vendor/llama.cpp

Copy file name to clipboard

0 commit comments

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