Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add GGUFHeader::read #8

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

McPatate
Copy link

Hello!

I needed a way to only read headers of .gguf files for performance reasons.

So I forked the repo and added what I needed to make it work.

cf https://github.com/McPatate/gguf-jinja-analysis if you're curious of what I used it for 😉

This PR does:

  • add GGUFHeader::read as a public method
  • add Clone to GGUFMetadataArrayValue & GGUFMetadataValue
  • re-order dependencies in Cargo.toml (sorry OCD, can revert if you don't care for the change)

You can disregard this PR if it's not of any use.

@McPatate
Copy link
Author

FYI, out of the 116k .gguf files I analysed, about 300-350 files' header failed to be parsed successfully. My intuition is that it is because some files have the .gguf extension when in fact they aren't, but there may be legit cases where the parser simply fails. Lmk if you want me to take a second look and gather more info on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant