Skip to content

Commit cab0c11

Browse files
committed
Merge remote-tracking branch 'origin/main' into river
2 parents 61d9a62 + 8c2bb30 commit cab0c11

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

llama_cpp/llama_cpp.py

Lines 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.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "llama_cpp_python"
3-
version = "0.1.27"
3+
version = "0.1.28"
44
description = "Python bindings for the llama.cpp library"
55
authors = ["Andrei Betlen <[email protected]>"]
66
license = "MIT"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
description="A Python wrapper for llama.cpp",
1111
long_description=long_description,
1212
long_description_content_type="text/markdown",
13-
version="0.1.27",
13+
version="0.1.28",
1414
author="Andrei Betlen",
1515
author_email="[email protected]",
1616
license="MIT",

vendor/llama.cpp

0 commit comments

Comments
 (0)