Skip to content

Commit

Permalink
increase scratch for above 4096
Browse files Browse the repository at this point in the history
  • Loading branch information
LostRuins committed Jul 2, 2023
1 parent b85ea58 commit e19483c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llama.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@ static void llama_model_load_internal(
const size_t scale = memory_type == GGML_TYPE_F32 ? 2 : 1;

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

0 comments on commit e19483c

Please sign in to comment.