From 4a1b1796b74811bc84a44809556416405ae53857 Mon Sep 17 00:00:00 2001 From: Ronan Collobert Date: Fri, 31 Oct 2025 13:20:47 -0700 Subject: [PATCH] WIP (io) --- mlx/io/gguf.cpp | 4 ++-- mlx/io/gguf_quants.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mlx/io/gguf.cpp b/mlx/io/gguf.cpp index 206f6fb31..096be49b0 100644 --- a/mlx/io/gguf.cpp +++ b/mlx/io/gguf.cpp @@ -238,7 +238,7 @@ std::unordered_map load_arrays(gguf_ctx* ctx) { return array_map; } -GGUFLoad load_gguf(const std::string& file, StreamOrDevice s) { +GGUFLoad load_gguf(const std::string& file, StreamOrDevice /* s */) { bool exists; { std::ifstream f(file.c_str()); @@ -440,7 +440,7 @@ void save_gguf( } const char* tensorname = key.c_str(); const uint64_t namelen = key.length(); - const uint32_t num_dim = arr.ndim(); + const int num_dim = arr.ndim(); std::vector dim(num_dim); for (int i = 0; i < num_dim; i++) { dim[i] = arr.shape()[num_dim - 1 - i]; diff --git a/mlx/io/gguf_quants.cpp b/mlx/io/gguf_quants.cpp index 148ed6c47..a05c7447e 100644 --- a/mlx/io/gguf_quants.cpp +++ b/mlx/io/gguf_quants.cpp @@ -77,8 +77,8 @@ void extract_q8_0_data( array& weights_arr, array& scales_arr, array& biases_arr) { - const uint64_t weights_per_block = 32; - const uint64_t bytes_per_block = 34; // 2 bytes scale, 32x1 byte weights + const int64_t weights_per_block = 32; + const int64_t bytes_per_block = 34; // 2 bytes scale, 32x1 byte weights auto data = static_cast(tensor.weights_data); auto weights = weights_arr.data(); auto scales = scales_arr.data();