Skip to content

Commit 822146b

Browse files
authored
feat: update llama.cpp to e3a74b299 (abetlen#2310)
1 parent 824565a commit 822146b

3 files changed

Lines changed: 15 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10-
- feat: update llama.cpp to ggml-org/llama.cpp@6eab47181
10+
- feat: update llama.cpp to ggml-org/llama.cpp@e3a74b299
1111

1212
## [0.3.29]
1313

llama_cpp/mtmd_cpp.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,12 @@ class mtmd_caps(Structure):
169169
POINTER(c_char_p),
170170
)
171171

172+
mtmd_helper_post_decode_callback = CFUNCTYPE(
173+
c_int,
174+
llama_cpp.llama_batch,
175+
c_void_p,
176+
)
177+
172178

173179
class mtmd_helper_bitmap_wrapper(Structure):
174180
"""Bitmap wrapper returned by MTMD helper media loaders."""
@@ -860,7 +866,9 @@ def mtmd_helper_eval_chunk_single(
860866
# llama_pos n_past,
861867
# llama_seq_id seq_id,
862868
# int32_t n_batch,
863-
# llama_pos * new_n_past);
869+
# llama_pos * new_n_past,
870+
# mtmd_helper_post_decode_callback callback,
871+
# void * user_data);
864872
@ctypes_function(
865873
"mtmd_helper_decode_image_chunk",
866874
[
@@ -872,6 +880,8 @@ def mtmd_helper_eval_chunk_single(
872880
llama_cpp.llama_seq_id,
873881
c_int,
874882
POINTER(llama_cpp.llama_pos),
883+
mtmd_helper_post_decode_callback,
884+
c_void_p,
875885
],
876886
c_int,
877887
)
@@ -884,6 +894,8 @@ def mtmd_helper_decode_image_chunk(
884894
seq_id: llama_cpp.llama_seq_id,
885895
n_batch: Union[c_int, int],
886896
new_n_past: "_Pointer[llama_cpp.llama_pos]",
897+
callback: Optional[mtmd_helper_post_decode_callback],
898+
user_data: c_void_p,
887899
/,
888900
) -> int:
889901
"""Decode a pre-encoded image chunk."""

0 commit comments

Comments
 (0)