From 5b2830ed30e0366de1834ff2ebece6e45ce3fe3a Mon Sep 17 00:00:00 2001 From: saharNooby Date: Mon, 3 Apr 2023 09:32:58 +0400 Subject: [PATCH] Increase memory for overhead from 32 MB to 256 MB --- rwkv.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rwkv.cpp b/rwkv.cpp index e228e57..ede0791 100644 --- a/rwkv.cpp +++ b/rwkv.cpp @@ -183,8 +183,9 @@ struct rwkv_context * rwkv_init_from_file(const char * file_path, uint32_t n_thr size_t(2) * 5 * model->n_layer * model->n_embed * sizeof(float) + // Logits size_t(model->n_vocab) * sizeof(float) + - // +32 MB just for any overhead - size_t(32) * 1024 * 1024; + // +256 MB just for any overhead + // TODO This is too much for smaller models; need a more proper and robust way of measuring required memory + size_t(256) * 1024 * 1024; // Initialize ggml struct ggml_init_params params;