Skip to content

Commit e19483c

Browse files
committed
increase scratch for above 4096
1 parent b85ea58 commit e19483c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llama.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1127,7 +1127,7 @@ static void llama_model_load_internal(
11271127
const size_t scale = memory_type == GGML_TYPE_F32 ? 2 : 1;
11281128

11291129
// this is the total memory required to run the inference
1130-
const size_t bigctxmul = (hparams.n_ctx>2048?2:1);
1130+
const size_t bigctxmul = (hparams.n_ctx>4096?3:(hparams.n_ctx>2048?2:1));
11311131
const size_t mem_required =
11321132
ctx_size +
11331133
mmapped_size - vram_weights + // weights in VRAM not in memory

0 commit comments

Comments
 (0)