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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +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@6eab47181
- feat: update llama.cpp to ggml-org/llama.cpp@e3a74b299

## [0.3.29]

Expand Down
14 changes: 13 additions & 1 deletion llama_cpp/mtmd_cpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,12 @@ class mtmd_caps(Structure):
POINTER(c_char_p),
)

mtmd_helper_post_decode_callback = CFUNCTYPE(
c_int,
llama_cpp.llama_batch,
c_void_p,
)


class mtmd_helper_bitmap_wrapper(Structure):
"""Bitmap wrapper returned by MTMD helper media loaders."""
Expand Down Expand Up @@ -860,7 +866,9 @@ def mtmd_helper_eval_chunk_single(
# llama_pos n_past,
# llama_seq_id seq_id,
# int32_t n_batch,
# llama_pos * new_n_past);
# llama_pos * new_n_past,
# mtmd_helper_post_decode_callback callback,
# void * user_data);
@ctypes_function(
"mtmd_helper_decode_image_chunk",
[
Expand All @@ -872,6 +880,8 @@ def mtmd_helper_eval_chunk_single(
llama_cpp.llama_seq_id,
c_int,
POINTER(llama_cpp.llama_pos),
mtmd_helper_post_decode_callback,
c_void_p,
],
c_int,
)
Expand All @@ -884,6 +894,8 @@ def mtmd_helper_decode_image_chunk(
seq_id: llama_cpp.llama_seq_id,
n_batch: Union[c_int, int],
new_n_past: "_Pointer[llama_cpp.llama_pos]",
callback: Optional[mtmd_helper_post_decode_callback],
user_data: c_void_p,
/,
) -> int:
"""Decode a pre-encoded image chunk."""
Expand Down
Loading