diff --git a/otherarch/gpt2_v2.cpp b/otherarch/gpt2_v2.cpp index 5f498a7a6..4da8b1921 100644 --- a/otherarch/gpt2_v2.cpp +++ b/otherarch/gpt2_v2.cpp @@ -352,7 +352,7 @@ bool gpt2_eval( static size_t buf_size = 256u*1024*1024; static void * buf = malloc(buf_size); - if (mem_per_token > 0 && (mem_per_token*N*2 + 48u*1024*1024) > buf_size) { + if (mem_per_token > 0 && (mem_per_token*N*2 + 64u*1024*1024) > buf_size) { const size_t buf_size_new = 320u*1024*1024 + 2*(mem_per_token*N); // add 10% to account for ggml object overhead //printf("\n%s: reallocating buffer from %zu to %zu bytes\n", __func__, buf_size, buf_size_new); diff --git a/otherarch/gptj_v2.cpp b/otherarch/gptj_v2.cpp index 591a4bb15..0fc1e16c0 100644 --- a/otherarch/gptj_v2.cpp +++ b/otherarch/gptj_v2.cpp @@ -364,7 +364,7 @@ bool gptj_eval( static size_t buf_size = 256u*1024*1024; static void * buf = malloc(buf_size); - if (mem_per_token > 0 && (mem_per_token*N*2 + 48u*1024*1024) > buf_size) { + if (mem_per_token > 0 && (mem_per_token*N*2 + 64u*1024*1024) > buf_size) { const size_t buf_size_new = 320u*1024*1024 + 2*(mem_per_token*N); // add 10% to account for ggml object overhead //printf("\n%s: reallocating buffer from %zu to %zu bytes\n", __func__, buf_size, buf_size_new); diff --git a/otherarch/neox.cpp b/otherarch/neox.cpp index 02e144404..c37a24e43 100644 --- a/otherarch/neox.cpp +++ b/otherarch/neox.cpp @@ -362,7 +362,7 @@ bool stablelm_eval( static size_t buf_size = 256u*1024*1024; static void * buf = malloc(buf_size); - if (mem_per_token > 0 && (mem_per_token*N*2 + 48u*1024*1024) > buf_size) { + if (mem_per_token > 0 && (mem_per_token*N*2 + 64u*1024*1024) > buf_size) { const size_t buf_size_new = 360u*1024*1024 + 2*(mem_per_token*N); // add 10% to account for ggml object overhead //printf("\n%s: reallocating buffer from %zu to %zu bytes\n", __func__, buf_size, buf_size_new);