mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-09-09 06:19:14 +02:00
Merge remote-tracking branch 'origin/master' into concedo
# Conflicts: # .github/workflows/docker.yml # CMakeLists.txt # flake.nix # main.cpp
This commit is contained in:
@@ -107,14 +107,14 @@ int llama_model_load(const std::string & fname, llama_model & model, gpt_vocab &
|
||||
{
|
||||
uint32_t magic;
|
||||
fin.read((char *) &magic, sizeof(magic));
|
||||
if (magic == 0x67676d6c) {
|
||||
if (magic == FILE_MAGIC_UNVERSIONED) {
|
||||
fprintf(stderr, "%s: invalid model file '%s' (too old, regenerate your model files!)\n",
|
||||
__func__, fname.c_str());
|
||||
legacy_file_format = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (magic != 0x67676d66) {
|
||||
if (magic != FILE_MAGIC) {
|
||||
fprintf(stderr, "%s: invalid model file '%s' (bad magic)\n", __func__, fname.c_str());
|
||||
return false;
|
||||
}
|
||||
@@ -122,9 +122,9 @@ int llama_model_load(const std::string & fname, llama_model & model, gpt_vocab &
|
||||
uint32_t format_version;
|
||||
fin.read((char *) &format_version, sizeof(format_version));
|
||||
|
||||
if (format_version != 1) {
|
||||
fprintf(stderr, "%s: invalid model file '%s' (unsupported format version %" PRIu32 ")\n",
|
||||
__func__, fname.c_str(), format_version);
|
||||
if (format_version != FILE_VERSION) {
|
||||
fprintf(stderr, "%s: invalid model file '%s' (unsupported format version %" PRIu32 ", expected %d)\n",
|
||||
__func__, fname.c_str(), format_version, FILE_VERSION);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user