Skip to content

Commit fff0e0e

Browse files
committed
llama : fix regression from #2000 - could not load no-mmap models
1 parent 417a85a commit fff0e0e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llama.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,9 @@ struct llama_file_loader {
555555
}
556556

557557
// skip to the next multiple of 32 bytes
558-
file.seek(-static_cast<ptrdiff_t>(file.tell()) & 31, SEEK_CUR);
558+
if (file_version >= LLAMA_FILE_VERSION_GGJT_V1) {
559+
file.seek(-static_cast<ptrdiff_t>(file.tell()) & 31, SEEK_CUR);
560+
}
559561

560562
tensor.file_off = file.tell();
561563
tensor.name = name;

0 commit comments

Comments
 (0)