Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- feat: update llama.cpp to ggml-org/llama.cpp@9e3b928fd
- feat(example): add OpenAI-compatible embeddings endpoint by @abetlen in #2281

## [0.3.27]
Expand Down
7 changes: 7 additions & 0 deletions llama_cpp/llama_cpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -949,6 +949,10 @@ class llama_sampler_seq_config(ctypes.Structure):
# // ref: https://github.com/ggml-org/llama.cpp/pull/14363
# struct llama_sampler_seq_config * samplers;
# size_t n_samplers;
#
# // a source/target/parent context
# // can be utilized in various ways, for example by sharing results or llama_memory between 2 contexts
# struct llama_context * ctx_other;
# };
class llama_context_params(ctypes.Structure):
"""Parameters for llama_context
Expand Down Expand Up @@ -989,6 +993,7 @@ class llama_context_params(ctypes.Structure):
kv_unified (bool): use a unified buffer across the input sequences when computing the attention
samplers (ctypes.POINTER(llama_sampler_seq_config)): backend sampler chain configuration
n_samplers (int): number of backend sampler chain configurations
ctx_other (llama_context_p): source, target, or parent context
"""

if TYPE_CHECKING:
Expand Down Expand Up @@ -1027,6 +1032,7 @@ class llama_context_params(ctypes.Structure):
kv_unified: bool
samplers: ctypes.POINTER(llama_sampler_seq_config)
n_samplers: int
ctx_other: llama_context_p

_fields_ = [
("n_ctx", ctypes.c_uint32),
Expand Down Expand Up @@ -1064,6 +1070,7 @@ class llama_context_params(ctypes.Structure):
("kv_unified", ctypes.c_bool),
("samplers", ctypes.POINTER(llama_sampler_seq_config)),
("n_samplers", ctypes.c_size_t),
("ctx_other", llama_context_p_ctypes),
]


Expand Down
Loading