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

Refactor gguf scripts to improve metadata handling #11909

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

CISC
Copy link
Contributor

@CISC CISC commented Feb 16, 2025

I've had these changes locally for quite a while and more or less forgotten about them, it's high time to make a PR as it fixes a few issues (endianess check) as well as improving and deduplicating metadata handling/rendering across all scripts.

  • Added contents method to ReaderField class
  • Added endianess property to GGUFReader class

Supercedes #11905

CISC added 3 commits February 16, 2025 13:44
Added contents method to ReaderField class
Added endianess property to GGUFReader class
@github-actions github-actions bot added the python python script changes label Feb 16, 2025
@ngxson ngxson requested a review from compilade February 16, 2025 15:06
Copy link
Collaborator

@compilade compilade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not test gguf_convert_endian or gguf_new_metadata, but I did test ReaderField.contents() in #11909 (comment) and gguf_dump, with both Numpy 1.26.4 and 2.2.0.

This is good and should finally completely fix #10127 even for big-endian models.

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

Successfully merging this pull request may close these issues.

2 participants