Skip to content

Function to check GGUF version? #3955

Answered by KerfuffleV2
danemadsen asked this question in Q&A
Discussion options

You must be logged in to vote

It's kind of hacky but you can just check the 5th byte in the file. The field is a uint32 but this should work until after GGUF version 255.

For example:

00000000  47 47 55 46 02 00 00 00  ed 00                    |GGUF......|

That's a GGUFv2 file.

00000000  47 47 55 46 03 00 00 00  1f 02                    |GGUF......|

That's a GGUFv3 file.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by danemadsen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants