Skip to content

Commit 9472d75

Browse files
committed
Sync llama.cpp API 20250801
1 parent 5859fc2 commit 9472d75

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

llama_cpp/llama_cpp.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -721,10 +721,11 @@ class llama_model_tensor_buft_override(ctypes.Structure):
721721

722722

723723
# // Keep the booleans together to avoid misalignment during copy-by-value.
724-
# bool vocab_only; // only load the vocabulary, no weights
725-
# bool use_mmap; // use mmap if possible
726-
# bool use_mlock; // force system to keep model in RAM
727-
# bool check_tensors; // validate model tensor data
724+
# bool vocab_only; // only load the vocabulary, no weights
725+
# bool use_mmap; // use mmap if possible
726+
# bool use_mlock; // force system to keep model in RAM
727+
# bool check_tensors; // validate model tensor data
728+
# bool use_extra_bufts; // use extra buffer types (used for weight repacking)
728729
# };
729730
class llama_model_params(ctypes.Structure):
730731
"""Parameters for llama_model
@@ -742,7 +743,8 @@ class llama_model_params(ctypes.Structure):
742743
vocab_only (bool): only load the vocabulary, no weights
743744
use_mmap (bool): use mmap if possible
744745
use_mlock (bool): force system to keep model in RAM
745-
check_tensors (bool): validate model tensor data"""
746+
check_tensors (bool): validate model tensor data
747+
use_extra_bufts (bool): use extra buffer types (used for weight repacking)"""
746748

747749
if TYPE_CHECKING:
748750
devices: CtypesArray[ctypes.c_void_p] # NOTE: unused
@@ -758,6 +760,7 @@ class llama_model_params(ctypes.Structure):
758760
use_mmap: bool
759761
use_mlock: bool
760762
check_tensors: bool
763+
use_extra_bufts: bool
761764

762765
_fields_ = [
763766
("devices", ctypes.c_void_p), # NOTE: unnused
@@ -773,6 +776,7 @@ class llama_model_params(ctypes.Structure):
773776
("use_mmap", ctypes.c_bool),
774777
("use_mlock", ctypes.c_bool),
775778
("check_tensors", ctypes.c_bool),
779+
("use_extra_bufts", ctypes.c_bool),
776780
]
777781

778782

0 commit comments

Comments
 (0)