8000 GGUF endianness cannot be determined from GGUF itself · Issue #3957 · ggml-org/llama.cpp · GitHub
[go: up one dir, main page]

Skip to content
GGUF endianness cannot be determined from GGUF itself #3957
Open
@philpax

Description

@philpax

As of the time of writing, the big-endian support that was added in #3552 doesn't encode the endianness within the file itself:

https://github.com/ggerganov/llama.cpp/blob/3d48f42efcd05381221654376e9f6f69d76af739/gguf-py/gguf/gguf.py#L689-L698

This means that there is no way to distinguish a big-endian GGUF file from a little-endian file, which may cause some degree of consternation in the future if these files get shared around 😅

The cleanest solution would be to add the endianness to the header - ideally, it would be in the metadata, but the reading of the metadata is dependent on the endianness - but that would be a breaking change.

Given that, my suggestion would be to use FUGG as the header for big-endian files so that a little-endian executor won't attempt to read it at all unless it knows how to deal with it. The same can go the other way, as well (a big-endian executor won't attempt to read a little-endian executor).

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking changeChanges that break ABIs, APIs, file formats, or other forms of backwards compatibility.enhancementNew feature or requestgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0