From 7a63d429afe96709194ff398ec8a1b280584c736 Mon Sep 17 00:00:00 2001 From: xaedes Date: Fri, 18 Aug 2023 17:32:31 +0200 Subject: [PATCH] adjust maximal values to support finetuning 3B models --- ggml-alloc.c | 2 +- ggml.h | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ggml-alloc.c b/ggml-alloc.c index ddf973dae..16f5a9e42 100644 --- a/ggml-alloc.c +++ b/ggml-alloc.c @@ -56,7 +56,7 @@ struct free_block { size_t size; }; -#define MAX_FREE_BLOCKS 128 +#define MAX_FREE_BLOCKS 256 struct ggml_allocr { void * data; diff --git a/ggml.h b/ggml.h index 02db9ad2b..1400ced0c 100644 --- a/ggml.h +++ b/ggml.h @@ -194,8 +194,8 @@ #define GGML_QNT_VERSION_FACTOR 1000 // do not change this #define GGML_MAX_DIMS 4 -#define GGML_MAX_NODES 4096 -#define GGML_MAX_PARAMS 256 +#define GGML_MAX_NODES 16384 +#define GGML_MAX_PARAMS 1024 #define GGML_MAX_CONTEXTS 64 #define GGML_MAX_SRC 6 #define GGML_MAX_NAME 48 @@ -475,7 +475,9 @@ extern "C" { // next prime after GGML_MAX_NODES // #define GGML_GRAPH_HASHTABLE_SIZE 4099 // next prime after GGML_MAX_NODES * 2 (nodes + leafs) - #define GGML_GRAPH_HASHTABLE_SIZE 8273 + // #define GGML_GRAPH_HASHTABLE_SIZE 8273 + // #define GGML_GRAPH_HASHTABLE_SIZE 16411 + #define GGML_GRAPH_HASHTABLE_SIZE 32771 // computation graph struct ggml_cgraph {