aboutsummaryrefslogtreecommitdiff
path: root/utils.h
diff options
context:
space:
mode:
authorMack Straight <eiz@users.noreply.github.com>2023-03-20 12:26:01 -0700
committerGitHub <noreply@github.com>2023-03-20 19:26:01 +0000
commita791a68b613b162c88a83f5f0225223bc167c762 (patch)
treec0bf6e5bd93bb1974e24a9df8f672212858709c0 /utils.h
parent0f1b21cb90ac6b84a9af70cafb8e13b5389e3b32 (diff)
move file magic/version to header, print expected version (#319)
Diffstat (limited to 'utils.h')
-rw-r--r--utils.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/utils.h b/utils.h
index b3a0f47..65fe02b 100644
--- a/utils.h
+++ b/utils.h
@@ -49,6 +49,14 @@ void gpt_print_usage(int argc, char ** argv, const gpt_params & params);
std::string gpt_random_prompt(std::mt19937 & rng);
//
+// Model file parsing
+//
+
+#define FILE_MAGIC_UNVERSIONED 0x67676d6c // pre-versioned files
+#define FILE_MAGIC 0x67676d66 // 'ggmf' in hex
+#define FILE_VERSION 1
+
+//
// Vocab utils
//