From 2f52008b203fc97e72d850e02b08c0cd49f56969 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=2E=20Yusuf=20Sar=C4=B1g=C3=B6z?= Date: Sat, 12 Aug 2023 07:24:46 +0300 Subject: [PATCH] gguf : rm references to old file magics --- gguf-llama.cpp | 4 ---- gguf-llama.h | 12 ------------ 2 files changed, 16 deletions(-) diff --git a/gguf-llama.cpp b/gguf-llama.cpp index 40d5ffd14..f80f823a0 100644 --- a/gguf-llama.cpp +++ b/gguf-llama.cpp @@ -3367,10 +3367,6 @@ int llama_apply_lora_from_file_internal(const struct llama_model & model, const { uint32_t magic; fin.read((char *) &magic, sizeof(magic)); - if (magic != LLAMA_FILE_MAGIC_GGLA) { - fprintf(stderr, "%s: bad file magic\n", __func__); - return 1; - } uint32_t format_version; fin.read((char *) &format_version, sizeof(format_version)); diff --git a/gguf-llama.h b/gguf-llama.h index 6062f375e..d3c0d6b87 100644 --- a/gguf-llama.h +++ b/gguf-llama.h @@ -34,18 +34,6 @@ # define DEPRECATED(func, hint) func #endif -#define LLAMA_FILE_MAGIC_GGJT 0x67676a74u // 'ggjt' -#define LLAMA_FILE_MAGIC_GGLA 0x67676c61u // 'ggla' -#define LLAMA_FILE_MAGIC_GGMF 0x67676d66u // 'ggmf' -#define LLAMA_FILE_MAGIC_GGML 0x67676d6cu // 'ggml' -#define LLAMA_FILE_MAGIC_GGSN 0x6767736eu // 'ggsn' - -#define LLAMA_FILE_VERSION 3 -#define LLAMA_FILE_MAGIC LLAMA_FILE_MAGIC_GGJT -#define LLAMA_FILE_MAGIC_UNVERSIONED LLAMA_FILE_MAGIC_GGML -#define LLAMA_SESSION_MAGIC LLAMA_FILE_MAGIC_GGSN -#define LLAMA_SESSION_VERSION 1 - #define LLAMA_DEFAULT_SEED 0xFFFFFFFF #if defined(GGML_USE_CUBLAS) || defined(GGML_USE_CLBLAST) || defined(GGML_USE_METAL)