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

[gguf] add support for legacy gguf v1 #568

Closed
madgetr opened this issue Mar 20, 2024 · 1 comment · Fixed by #569
Closed

[gguf] add support for legacy gguf v1 #568

madgetr opened this issue Mar 20, 2024 · 1 comment · Fixed by #569

Comments

@madgetr
Copy link
Contributor

madgetr commented Mar 20, 2024

It seems that there is code roughed in to support parsing v1 gguf files yet it is hard coded to parse as v3.

const length = view.getBigUint64(offset, littleEndian);

function readVersionedSize(view: DataView, byteOffset: number, version: Version, littleEndian: boolean): bigint {

Example of problem
https://huggingface.co/tmadge/testing/tree/main?show_tensors=tinyllamas-stories-260k-f32.gguf
image

@madgetr
Copy link
Contributor Author

madgetr commented Mar 20, 2024

Fixed in #569

mishig25 pushed a commit that referenced this issue Mar 21, 2024
It seems that v1 gguf was never supported. This pr addresses that by
selectively reading bytes as Uint32 for v1 and UInt64 for v2 and v3.

Fixes #568

---------

Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu>
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 a pull request may close this issue.

1 participant