aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgi Gerganov <ggerganov@gmail.com>2023-07-20 13:47:26 +0300
committerGeorgi Gerganov <ggerganov@gmail.com>2023-07-20 13:47:26 +0300
commitfff0e0eafe817eef429ecb64f892ab7bdae31846 (patch)
tree5a4e33bbd35c12266a6f5f5f134494aefae52d42
parent417a85a0010519224cf154eb85d383ffeafeeead (diff)
llama : fix regression from #2000 - could not load no-mmap models
-rw-r--r--llama.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llama.cpp b/llama.cpp
index 3319b70..796dfda 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<ptrdiff_t>(file.tell()) & 31, SEEK_CUR);
+ if (file_version >= LLAMA_FILE_VERSION_GGJT_V1) {
+ file.seek(-static_cast<ptrdiff_t>(file.tell()) & 31, SEEK_CUR);
+ }
tensor.file_off = file.tell();
tensor.name = name;