From ec372c66a4e79d152b89de010e7ca44557cc236f Mon Sep 17 00:00:00 2001 From: Pierrick HYMBERT Date: Fri, 22 Mar 2024 06:52:00 +0100 Subject: [PATCH] llama_model_loader: use at instead of operator[] if this should never add to the map. --- llama.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llama.cpp b/llama.cpp index d2d74b025..decb895f3 100644 --- a/llama.cpp +++ b/llama.cpp @@ -3293,7 +3293,7 @@ struct llama_model_loader { // unmap offloaded tensors and metadata if (use_mmap) { for (uint32_t idx = 0; idx < mappings.size(); idx++) { - const auto & mmap_used = mmaps_used[idx]; + const auto & mmap_used = mmaps_used.at(idx); auto & mapping = mappings.at(idx); mapping->unmap_fragment(0, mmap_used.first); if (mmap_used.second != 0) {