Expand description
A minimal GGUF header reader: enough to pull the architecture, context length, and chat-template presence without loading the weights.
Values are little-endian. The reader streams over a buffered file handle and seeks past values it does not need, so it never reads the tensor data.
Functionsยง
- gguf_
facts - Read the architecture, context length, and chat-template presence from a GGUF
header. Returns
Noneif the file is not a valid GGUF (v2+) header. - gguf_
general_ architecture - The
general.architecturevalue from a GGUF header, if any. - has_
ggml_ magic - Whether the file begins with the legacy GGML magic bytes (
lmggis the little-endian byte order of theggmlmagic). - has_
gguf_ magic - Whether the file begins with the GGUF magic bytes.