From c25ed2a522f8a55e1156f6e414ab8f8b12c7d45f Mon Sep 17 00:00:00 2001 From: John Boero Date: Mon, 4 Sep 2023 14:19:25 +0100 Subject: [PATCH 1/3] Added magic for file types --- grammars/magic | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 grammars/magic diff --git a/grammars/magic b/grammars/magic new file mode 100644 index 0000000000000..d124aaa507336 --- /dev/null +++ b/grammars/magic @@ -0,0 +1,7 @@ +# Magic local data for file(1) command. +# Append this to your /etc/magic file. +# Insert here your local magic data. Format is described in magic(5). +0 string tjgg GGML/GGJT LLM model +>0x4 lelong <255 version=%d +0 string GGUF GGUF LLM model +>0x4 lelong <255 version=%d From 7cfce5ef0f234156b4141a35d7b1180015461c41 Mon Sep 17 00:00:00 2001 From: John Boero Date: Tue, 5 Sep 2023 12:12:49 +0100 Subject: [PATCH 2/3] Moved magic to docs. --- docs/magic.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 docs/magic.md diff --git a/docs/magic.md b/docs/magic.md new file mode 100644 index 0000000000000..54bc46188e13e --- /dev/null +++ b/docs/magic.md @@ -0,0 +1,14 @@ +Magic File for Model Information +------------------------ + +Until these models are registered with MIME/Media info you can add this to your local magic file to get simple model details without a hex editor. + +### Prepare: +Magic local data for file(1) command. Append this to your /etc/magic file. Insert here your local magic data. Format is described in magic(5). Hopefully this will reach upstream/mainline magic files for distributions soon. + +``` +0 string tjgg GGML/GGJT LLM model +>0x4 lelong <255 version=%d +0 string GGUF GGUF LLM model +>0x4 lelong <255 version=%d +``` \ No newline at end of file From a7f5c74795ba6e356f5128889ce12546c1a24ae3 Mon Sep 17 00:00:00 2001 From: Cebtenzzre Date: Tue, 5 Sep 2023 14:57:53 -0400 Subject: [PATCH 3/3] magic.md : fix missing final newline --- docs/magic.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/magic.md b/docs/magic.md index 54bc46188e13e..5bb0fd0e0bab2 100644 --- a/docs/magic.md +++ b/docs/magic.md @@ -11,4 +11,4 @@ Magic local data for file(1) command. Append this to your /etc/magic file. Inser >0x4 lelong <255 version=%d 0 string GGUF GGUF LLM model >0x4 lelong <255 version=%d -``` \ No newline at end of file +```