From 4803142300670088f10f61f9ab66d882e93df4b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thireus=20=E2=98=A0?= Date: Wed, 16 Jul 2025 13:11:19 +0100 Subject: Bump GGML_MAX_CONTEXTS to allow loading more shards (#611) * Bump GGML_MAX_CONTEXTS to allow loading more shards This var prevents more than 64 shards from being loaded - Specifically relevant for large models such as DeepSeek R1. * https://github.com/ikawrakow/ik_llama.cpp/pull/611#issuecomment-3072175559 --- ggml/include/ggml.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ggml/include/ggml.h b/ggml/include/ggml.h index a85f52b2..644a82b2 100644 --- a/ggml/include/ggml.h +++ b/ggml/include/ggml.h @@ -234,7 +234,12 @@ #define GGML_MAX_DIMS 4 #define GGML_MAX_PARAMS 2048 -#define GGML_MAX_CONTEXTS 64 +#ifndef GGML_MAX_CONTEXTS +// Maximum number of model contexts (e.g., for model shards). +// Increase this value using -DGGML_MAX_CONTEXTS= in CMake +// if you need to load more than 64 model shards. +#define GGML_MAX_CONTEXTS 64 +#endif #define GGML_MAX_SRC 10 #ifndef GGML_MAX_NAME #define GGML_MAX_NAME 64 -- cgit v1.2.3