mirror of
https://gitlab.com/niansa/libjustlm.git
synced 2025-03-06 20:49:17 +01:00
Fixed compile errors because of previous commit
This commit is contained in:
parent
0142db3f7c
commit
09e59a9536
2 changed files with 4 additions and 4 deletions
|
@ -32,7 +32,7 @@ static bool kv_cache_init(
|
||||||
const int64_t n_mem = (int64_t)n_layer*n_ctx;
|
const int64_t n_mem = (int64_t)n_layer*n_ctx;
|
||||||
const int64_t n_elements = n_embd*n_mem;
|
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;
|
struct ggml_init_params params;
|
||||||
params.mem_size = cache.buf.size;
|
params.mem_size = cache.buf.size;
|
||||||
|
@ -394,7 +394,7 @@ bool gptj_eval(
|
||||||
const int n_vocab = hparams.n_vocab;
|
const int n_vocab = hparams.n_vocab;
|
||||||
const int n_rot = hparams.n_rot;
|
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)
|
if (!model.buf.addr || model.buf.size < buf_size)
|
||||||
model.buf.resize(buf_size);
|
model.buf.resize(buf_size);
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ static bool kv_cache_init(
|
||||||
const int64_t n_mem = (int64_t)n_layer*n_ctx;
|
const int64_t n_mem = (int64_t)n_layer*n_ctx;
|
||||||
const int64_t n_elements = n_embd*n_mem;
|
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;
|
struct ggml_init_params params;
|
||||||
params.mem_size = cache.buf.size;
|
params.mem_size = cache.buf.size;
|
||||||
|
@ -356,7 +356,7 @@ bool mpt_eval(
|
||||||
const int n_head = hparams.n_head;
|
const int n_head = hparams.n_head;
|
||||||
const int n_vocab = hparams.n_vocab;
|
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)
|
if (!model.buf.addr || model.buf.size < init_buf_size)
|
||||||
model.buf.resize(init_buf_size);
|
model.buf.resize(init_buf_size);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue