From 69bdee939a8604f7648d322f6ec5b0f202605fb9 Mon Sep 17 00:00:00 2001 From: Pierrick HYMBERT Date: Thu, 21 Mar 2024 21:42:30 +0100 Subject: [PATCH] llama_model_loader: only map tensors included in the context --- llama.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/llama.cpp b/llama.cpp index a7945ef09..c3b97471c 100644 --- a/llama.cpp +++ b/llama.cpp @@ -5171,7 +5171,6 @@ static bool llm_load_tensors( size_t first, last; ml.get_mapping_range(&first, &last, &addr, file_no, ctx); if (first >= last) { - bufs.push_back(nullptr); // add a dummy buffer to keep the indices in sync continue; } ggml_backend_buffer_t buf = ggml_backend_metal_buffer_from_ptr((char *) addr + first, last - first, max_size);