diff --git a/CHANGELOG.md b/CHANGELOG.md index bbe7b13bd..7c6a7d969 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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@5a69c9743 +- feat: update llama.cpp to ggml-org/llama.cpp@465b1f0e7 - feat(example): Updated server example (batch processing, multi-token prediction, `/v1/responses` api, response parsing) by @abetlen in #2174 ## [0.3.26] diff --git a/examples/server/server.py b/examples/server/server.py index 6a500ceec..590a21420 100644 --- a/examples/server/server.py +++ b/examples/server/server.py @@ -10102,6 +10102,7 @@ def _create_bitmap(self, media_bytes: bytes, kind: Literal["image", "audio"]) -> self.ctx, buffer, len(media_bytes), + False, ) if bitmap is None: raise CompletionRequestValidationError(f"failed to create MTMD {kind} bitmap") diff --git a/llama_cpp/llama_chat_format.py b/llama_cpp/llama_chat_format.py index 4298642f6..0034bdae9 100644 --- a/llama_cpp/llama_chat_format.py +++ b/llama_cpp/llama_chat_format.py @@ -2841,6 +2841,7 @@ def _create_bitmap_from_bytes(self, image_bytes: bytes): self.mtmd_ctx, (ctypes.c_uint8 * len(image_bytes)).from_buffer(bytearray(image_bytes)), len(image_bytes), + False, ) if bitmap is None: @@ -3332,6 +3333,7 @@ def _create_bitmap_from_bytes(self, image_bytes: bytes): self.mtmd_ctx, (ctypes.c_uint8 * len(image_bytes)).from_buffer(bytearray(image_bytes)), len(image_bytes), + False, ) if bitmap is None: diff --git a/llama_cpp/mtmd_cpp.py b/llama_cpp/mtmd_cpp.py index 8c2ebbfef..abe4c7a67 100644 --- a/llama_cpp/mtmd_cpp.py +++ b/llama_cpp/mtmd_cpp.py @@ -551,29 +551,30 @@ def mtmd_test_create_input_chunks() -> Optional[mtmd_input_chunks_p]: ################################################ -# MTMD_API mtmd_bitmap * mtmd_helper_bitmap_init_from_file(mtmd_context * ctx, const char * fname); +# MTMD_API mtmd_bitmap * mtmd_helper_bitmap_init_from_file(mtmd_context * ctx, const char * fname, bool placeholder); @ctypes_function( "mtmd_helper_bitmap_init_from_file", - [mtmd_context_p_ctypes, c_char_p], + [mtmd_context_p_ctypes, c_char_p, c_bool], mtmd_bitmap_p_ctypes, ) def mtmd_helper_bitmap_init_from_file( - ctx: mtmd_context_p, fname: bytes, / + ctx: mtmd_context_p, fname: bytes, placeholder: Union[c_bool, bool], / ) -> Optional[mtmd_bitmap_p]: """Initialize an MTMD bitmap from a file.""" ... -# MTMD_API mtmd_bitmap * mtmd_helper_bitmap_init_from_buf(mtmd_context * ctx, const unsigned char * buf, size_t len); +# MTMD_API mtmd_bitmap * mtmd_helper_bitmap_init_from_buf(mtmd_context * ctx, const unsigned char * buf, size_t len, bool placeholder); @ctypes_function( "mtmd_helper_bitmap_init_from_buf", - [mtmd_context_p_ctypes, POINTER(c_uint8), c_size_t], + [mtmd_context_p_ctypes, POINTER(c_uint8), c_size_t, c_bool], mtmd_bitmap_p_ctypes, ) def mtmd_helper_bitmap_init_from_buf( ctx: mtmd_context_p, buf: CtypesArray[c_uint8], length: Union[c_size_t, int], + placeholder: Union[c_bool, bool], /, ) -> Optional[mtmd_bitmap_p]: ... diff --git a/vendor/llama.cpp b/vendor/llama.cpp index 5a69c9743..465b1f0e7 160000 --- a/vendor/llama.cpp +++ b/vendor/llama.cpp @@ -1 +1 @@ -Subproject commit 5a69c974392020e514c3b2b2910bb92f847cb4c9 +Subproject commit 465b1f0e75c590426cff3ca998bcd25297071a5b