I'd like to propose 2 small additions for the next time a breaking GGUF format change is needed #3975
KerfuffleV2
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The first is a "seek to absolute offset" field. Just a GGUF type and a 64bit absolute offset into the file.
The second is to require tensor definitions to include an absolute offset into the file where the data starts and the length in bytes. That way, it would be possible to do something like show/manipulate the metadata without necessarily knowing internal details like what size a
Q8_0
block is or how many elements it has in it.The seek thing might not sound that useful at first but imagine this: You create a GGUF file of Falcon 180B and you realize you wrote "Falcn" in the description field. Well, if you want to add that one "o" byte, you will have to rewrite the entire file. Basically any change to the metadata that changes the length of the field will require rewriting the entire file. However, with the seek change you could just replace the current description field with a seek past the last tensor, put your new description metadata there and right after it have a seek back to the original metadata (or you could just rewrite the metadata at the end of the file you don't care about wasting a little space.)
This could also support embedding custom fields or metadata that GGUF doesn't have to know about or support directly. For example, you could use this to store stuff like an icon for the model in the file, chat templates, etc. Some other application or tool could expect a seek op+some magic after a specific field, let's say
x-gguf-icon
. People may or may not want to do that sort of stuff, but it's a very small change that actually enables a lot of options. The main one though is it actually becoming practical to make metadata changes to GGUF files without having to rewrite the entire thing.Beta Was this translation helpful? Give feedback.
All reactions