From 09e59a9536ff8902d0db5850fe55ad4e7f4d7357 Mon Sep 17 00:00:00 2001 From: niansa Date: Wed, 31 May 2023 20:22:18 +0200 Subject: [PATCH] Fixed compile errors because of previous commit --- gptj/gptj.cpp | 4 ++-- mpt/mpt.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gptj/gptj.cpp b/gptj/gptj.cpp index 0551780..1b49b04 100644 --- a/gptj/gptj.cpp +++ b/gptj/gptj.cpp @@ -32,7 +32,7 @@ static bool kv_cache_init( const int64_t n_mem = (int64_t)n_layer*n_ctx; const int64_t n_elements = n_embd*n_mem; - cache.buf.resize(2u*n_elements*ggml_type_size(wtype) + 2_MB); + cache.buf.resize(2u*n_elements*ggml_type_size(wtype) + 2_MiB); struct ggml_init_params params; params.mem_size = cache.buf.size; @@ -394,7 +394,7 @@ bool gptj_eval( const int n_vocab = hparams.n_vocab; const int n_rot = hparams.n_rot; - static size_t buf_size = 1024_MB; + static size_t buf_size = 1024_MiB; if (!model.buf.addr || model.buf.size < buf_size) model.buf.resize(buf_size); diff --git a/mpt/mpt.cpp b/mpt/mpt.cpp index c4fa0fb..b8c0914 100644 --- a/mpt/mpt.cpp +++ b/mpt/mpt.cpp @@ -34,7 +34,7 @@ static bool kv_cache_init( const int64_t n_mem = (int64_t)n_layer*n_ctx; const int64_t n_elements = n_embd*n_mem; - cache.buf.resize(2u*n_elements*ggml_type_size(wtype) + 2_MB); + cache.buf.resize(2u*n_elements*ggml_type_size(wtype) + 2_MiB); struct ggml_init_params params; params.mem_size = cache.buf.size; @@ -356,7 +356,7 @@ bool mpt_eval( const int n_head = hparams.n_head; const int n_vocab = hparams.n_vocab; - const size_t init_buf_size = 1024_MB; + const size_t init_buf_size = 1024_MiB; if (!model.buf.addr || model.buf.size < init_buf_size) model.buf.resize(init_buf_size);