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 ggerganov/llama.cpp@91e84fed6 and sync Python bindings
- fix: Enable unified KV cache for embedding contexts to preserve full per-sequence context in batch embedding calls by @SanjanaB123 in #2217

## [0.3.23]
Expand Down
3 changes: 3 additions & 0 deletions llama_cpp/llama_cpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -2837,6 +2837,9 @@ def llama_state_seq_load_file(
) -> int: ...


# define LLAMA_STATE_SEQ_FLAGS_NONE 0
LLAMA_STATE_SEQ_FLAGS_NONE = 0

# for backwards-compat
# define LLAMA_STATE_SEQ_FLAGS_SWA_ONLY 1
LLAMA_STATE_SEQ_FLAGS_SWA_ONLY = 1
Expand Down
24 changes: 24 additions & 0 deletions llama_cpp/mtmd_cpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,23 @@ class mtmd_decoder_pos(Structure):
]


# struct mtmd_caps {
# bool inp_vision;
# bool inp_audio;
# };
class mtmd_caps(Structure):
"""Capabilities exposed by an mmproj file."""

if TYPE_CHECKING:
inp_vision: bool
inp_audio: bool

_fields_ = [
("inp_vision", c_bool),
("inp_audio", c_bool),
]


################################################
# mtmd.h functions
################################################
Expand Down Expand Up @@ -515,6 +532,13 @@ def mtmd_get_output_embd(ctx: mtmd_context_p, /) -> Optional[CtypesArray[c_float
...


# MTMD_API struct mtmd_caps mtmd_get_cap_from_file(const char * mmproj_fname);
@ctypes_function("mtmd_get_cap_from_file", [c_char_p], mtmd_caps)
def mtmd_get_cap_from_file(mmproj_fname: bytes, /) -> mtmd_caps:
"""Get mmproj capabilities without initializing a full MTMD context."""
...


# MTMD_API mtmd_input_chunks * mtmd_test_create_input_chunks(void);
@ctypes_function("mtmd_test_create_input_chunks", [], mtmd_input_chunks_p_ctypes)
def mtmd_test_create_input_chunks() -> Optional[mtmd_input_chunks_p]:
Expand Down
2 changes: 1 addition & 1 deletion vendor/llama.cpp
Loading