From cd8a3e2bb7e324f34f975c3e60686fda7d8f2751 Mon Sep 17 00:00:00 2001 From: abetlen Date: Sat, 11 Jul 2026 09:13:29 -0700 Subject: [PATCH 1/2] feat: update ggml to 0.16.0 --- ggml/ggml.py | 28 +++++++++------------------- vendor/ggml | 2 +- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/ggml/ggml.py b/ggml/ggml.py index ac0f41ec..3b4ff50d 100644 --- a/ggml/ggml.py +++ b/ggml/ggml.py @@ -307,9 +307,9 @@ def f_(*args: Any, **kwargs: Any): GGML_EXIT_ABORTED = 1 GGML_VERSION_MAJOR = 0 -GGML_VERSION_MINOR = 15 -GGML_VERSION_PATCH = 3 -GGML_VERSION = "0.15.3" +GGML_VERSION_MINOR = 16 +GGML_VERSION_PATCH = 0 +GGML_VERSION = "0.16.0" GGML_ROPE_TYPE_NORMAL = 0 GGML_ROPE_TYPE_NEOX = 2 @@ -483,7 +483,8 @@ def ggml_fp32_to_bf16_row(fp32: CtypesPointer[ctypes.c_float], bf16: CtypesPoint # GGML_TYPE_MXFP4 = 39, # GGML_TYPE_NVFP4 = 40, # GGML_TYPE_Q1_0 = 41, -# GGML_TYPE_COUNT = 42, +# GGML_TYPE_Q2_0 = 42, +# GGML_TYPE_COUNT = 43, # }; GGML_TYPE_F32 = 0 GGML_TYPE_F16 = 1 @@ -519,7 +520,8 @@ def ggml_fp32_to_bf16_row(fp32: CtypesPointer[ctypes.c_float], bf16: CtypesPoint GGML_TYPE_MXFP4 = 39 GGML_TYPE_NVFP4 = 40 GGML_TYPE_Q1_0 = 41 -GGML_TYPE_COUNT = 42 +GGML_TYPE_Q2_0 = 42 +GGML_TYPE_COUNT = 43 # // precision @@ -576,6 +578,7 @@ def ggml_fp32_to_bf16_row(fp32: CtypesPointer[ctypes.c_float], bf16: CtypesPoint # GGML_FTYPE_MOSTLY_MXFP4 = 25, // except 1d tensors # GGML_FTYPE_MOSTLY_NVFP4 = 26, // except 1d tensors # GGML_FTYPE_MOSTLY_Q1_0 = 27, // except 1d tensors +# GGML_FTYPE_MOSTLY_Q2_0 = 28, // except 1d tensors # }; GGML_FTYPE_UNKNOWN = -1 GGML_FTYPE_ALL_F32 = 0 @@ -604,6 +607,7 @@ def ggml_fp32_to_bf16_row(fp32: CtypesPointer[ctypes.c_float], bf16: CtypesPoint GGML_FTYPE_MOSTLY_MXFP4 = 25 GGML_FTYPE_MOSTLY_NVFP4 = 26 GGML_FTYPE_MOSTLY_Q1_0 = 27 +GGML_FTYPE_MOSTLY_Q2_0 = 28 # // available tensor operations: @@ -15783,20 +15787,6 @@ def ggml_backend_cuda_allreduce_tensor( ... -# GGML_API GGML_CALL ggml_backend_buffer_type_t ggml_backend_cuda_split_buffer_type(int main_device, const float * tensor_split); -@ggml_function( - "ggml_backend_cuda_split_buffer_type", - [ctypes.c_int, ctypes.POINTER(ctypes.c_float)], - ggml_backend_buffer_type_t_ctypes, - enabled=GGML_USE_CUDA, -) -def ggml_backend_cuda_split_buffer_type( - main_device: Union[ctypes.c_int, int], - tensor_split: CtypesArray[ctypes.c_float], -) -> Optional[ggml_backend_buffer_type_t]: - ... - - # // pinned host buffer for use with the CPU backend for faster copies between CPU and GPU # GGML_API GGML_CALL ggml_backend_buffer_type_t ggml_backend_cuda_host_buffer_type(void); @ggml_function( diff --git a/vendor/ggml b/vendor/ggml index eced84c8..524f974b 160000 --- a/vendor/ggml +++ b/vendor/ggml @@ -1 +1 @@ -Subproject commit eced84c86f8b012c752c016f7fe789adea168e1e +Subproject commit 524f974bb21a1013408f76d71c15732482c0c3fe From 3b21620a63408e75a5b97996be2b8c297621df34 Mon Sep 17 00:00:00 2001 From: abetlen Date: Sat, 11 Jul 2026 09:14:02 -0700 Subject: [PATCH 2/2] docs: add ggml 0.16.0 changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e9e4215..33d151e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +- feat: update ggml to 0.16.0 by @abetlen in #183 - feat: add buffer protocol support to utils by @aisk in #175 ## [0.0.45]