Skip to content

Commit 487a149

Browse files
committed
llama : mmap
ggml-ci
1 parent 8233c18 commit 487a149

File tree

5 files changed

+608
-569
lines changed

5 files changed

+608
-569
lines changed

src/llama-context.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ static bool llama_state_load_file_internal(struct llama_context * ctx, const cha
799799

800800
// restore the context state
801801
{
802-
const size_t n_state_size_cur = file.size - file.tell();
802+
const size_t n_state_size_cur = file.size() - file.tell();
803803

804804
llama_data_read_file data_ctx(&file);
805805
const size_t n_read = llama_state_set_data_internal(ctx, data_ctx);
@@ -936,7 +936,7 @@ static size_t llama_state_seq_load_file_internal(struct llama_context * ctx, con
936936

937937
// restore the context state
938938
{
939-
const size_t state_size = file.size - file.tell();
939+
const size_t state_size = file.size() - file.tell();
940940
llama_data_read_file data_ctx(&file);
941941
const size_t nread = llama_state_seq_set_data_internal(ctx, data_ctx, dest_seq_id);
942942
if (!nread) {

0 commit comments

Comments
 (0)