From: Georgi Gerganov Date: Thu, 20 Jul 2023 10:47:26 +0000 (+0300) Subject: llama : fix regression from #2000 - could not load no-mmap models X-Git-Tag: gguf-v0.4.0~452 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=fff0e0eafe817eef429ecb64f892ab7bdae31846;p=pkg%2Fggml%2Fsources%2Fllama.cpp llama : fix regression from #2000 - could not load no-mmap models --- diff --git a/llama.cpp b/llama.cpp index 3319b702..796dfdac 100644 --- a/llama.cpp +++ b/llama.cpp @@ -555,7 +555,9 @@ struct llama_file_loader { } // skip to the next multiple of 32 bytes - file.seek(-static_cast(file.tell()) & 31, SEEK_CUR); + if (file_version >= LLAMA_FILE_VERSION_GGJT_V1) { + file.seek(-static_cast(file.tell()) & 31, SEEK_CUR); + } tensor.file_off = file.tell(); tensor.name = name;