Skip to content

Commit cf18830

Browse files
authored
feat: update llama.cpp to ggml-org/llama.cpp@465b1f0e7 (abetlen#2278)
1 parent 66635a0 commit cf18830

5 files changed

Lines changed: 11 additions & 7 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@5a69c9743
10+
- feat: update llama.cpp to ggml-org/llama.cpp@465b1f0e7
1111
- feat(example): Updated server example (batch processing, multi-token prediction, `/v1/responses` api, response parsing) by @abetlen in #2174
1212

1313
## [0.3.26]

examples/server/server.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10102,6 +10102,7 @@ def _create_bitmap(self, media_bytes: bytes, kind: Literal["image", "audio"]) ->
1010210102
self.ctx,
1010310103
buffer,
1010410104
len(media_bytes),
10105+
False,
1010510106
)
1010610107
if bitmap is None:
1010710108
raise CompletionRequestValidationError(f"failed to create MTMD {kind} bitmap")

llama_cpp/llama_chat_format.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2841,6 +2841,7 @@ def _create_bitmap_from_bytes(self, image_bytes: bytes):
28412841
self.mtmd_ctx,
28422842
(ctypes.c_uint8 * len(image_bytes)).from_buffer(bytearray(image_bytes)),
28432843
len(image_bytes),
2844+
False,
28442845
)
28452846

28462847
if bitmap is None:
@@ -3332,6 +3333,7 @@ def _create_bitmap_from_bytes(self, image_bytes: bytes):
33323333
self.mtmd_ctx,
33333334
(ctypes.c_uint8 * len(image_bytes)).from_buffer(bytearray(image_bytes)),
33343335
len(image_bytes),
3336+
False,
33353337
)
33363338

33373339
if bitmap is None:

llama_cpp/mtmd_cpp.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -551,29 +551,30 @@ def mtmd_test_create_input_chunks() -> Optional[mtmd_input_chunks_p]:
551551
################################################
552552

553553

554-
# MTMD_API mtmd_bitmap * mtmd_helper_bitmap_init_from_file(mtmd_context * ctx, const char * fname);
554+
# MTMD_API mtmd_bitmap * mtmd_helper_bitmap_init_from_file(mtmd_context * ctx, const char * fname, bool placeholder);
555555
@ctypes_function(
556556
"mtmd_helper_bitmap_init_from_file",
557-
[mtmd_context_p_ctypes, c_char_p],
557+
[mtmd_context_p_ctypes, c_char_p, c_bool],
558558
mtmd_bitmap_p_ctypes,
559559
)
560560
def mtmd_helper_bitmap_init_from_file(
561-
ctx: mtmd_context_p, fname: bytes, /
561+
ctx: mtmd_context_p, fname: bytes, placeholder: Union[c_bool, bool], /
562562
) -> Optional[mtmd_bitmap_p]:
563563
"""Initialize an MTMD bitmap from a file."""
564564
...
565565

566566

567-
# MTMD_API mtmd_bitmap * mtmd_helper_bitmap_init_from_buf(mtmd_context * ctx, const unsigned char * buf, size_t len);
567+
# MTMD_API mtmd_bitmap * mtmd_helper_bitmap_init_from_buf(mtmd_context * ctx, const unsigned char * buf, size_t len, bool placeholder);
568568
@ctypes_function(
569569
"mtmd_helper_bitmap_init_from_buf",
570-
[mtmd_context_p_ctypes, POINTER(c_uint8), c_size_t],
570+
[mtmd_context_p_ctypes, POINTER(c_uint8), c_size_t, c_bool],
571571
mtmd_bitmap_p_ctypes,
572572
)
573573
def mtmd_helper_bitmap_init_from_buf(
574574
ctx: mtmd_context_p,
575575
buf: CtypesArray[c_uint8],
576576
length: Union[c_size_t, int],
577+
placeholder: Union[c_bool, bool],
577578
/,
578579
) -> Optional[mtmd_bitmap_p]: ...
579580

0 commit comments

Comments
 (0)