hide gpu input box when dropdown not selected, minor memory fix for neox and gptj

This commit is contained in:
Concedo
2023-06-04 21:47:17 +08:00
parent 1ddbb9acd9
commit 9aa2d8535b
3 changed files with 22 additions and 10 deletions
+1 -1
View File
@@ -368,7 +368,7 @@ bool gptj_eval(
static void * buf = malloc(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
const size_t buf_size_new = 320u*1024*1024 + 1.7*(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);
// reallocate